-
Notifications
You must be signed in to change notification settings - Fork 1
/
D2M1_MSSQL.TPW
75 lines (75 loc) · 4.32 KB
/
D2M1_MSSQL.TPW
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#! File Name: D2M1_MSSQL.tpw
#! Purpose: METABASE: DCT to MSSQL creation script
#! Author: Copyright © 1999-2999 by Roberto Artigas Jr
#! All rights reserved world wide.
#! Changes:
#! 2019.09.11: Roberto Artigas (for Mr. Arnold Young)
#! * Create single file combined MYSQL SQL generation for a backend by changing the %Basename.
#! 2019.08.14: Roberto Artigas
#! * Create single file combined POSTGRESQL SQL generation for a backend.
#! 2019.07.04: Roberto Artigas
#! * Added option to select files to do SQL generation.
#! 2018.06.03 Roberto Artigas
#! * POSTGRESQL template creation.
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!GROUP(%MITLicenseD2M2POSTGRESQL)
#!TAB('MIT'),PROP(PROP:FontStyle,700)
#!INSERT(%MITLicense)
#!ENDTAB
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!
#UTILITY(D2M1_MSSQL, '2019.10.11: [COMBINED] MSSQL script')
#!-----------------------------------------------------------------------------
#! RA.2017.12.17 - The %BaseName determines what backend you are processing.
#! All the specific items related to a backend can be coded with a case statement.
#! This will make the code easier to maintain accross all the backends.
#PREPARE
#DECLARE(%BaseName) #! Define the BACKEND here
#SET(%BaseName, 'MSSQL') #! SPECIFIC
#ENDPREPARE
#!---------------------------------------------------------------------
#INSERT(%VariablesCommon) #! Need a few simple variables
#INSERT(%GetDictionaryPath) #! Get dictionary path and names
#INSERT(%VariablesDeclare) #! Option checks and output file names
#INSERT(%VariablesSetup) #! Setup output file names
#INSERT(%FileNamesAreOne) #! RA.2019.08.14: Combined file names
#INSERT(%VariablesOptions) #! All option variables setup here
#INSERT(%DefineAreasOptions) #! File,Field,Keys,Relations
#INSERT(%ReserveWordDefines) #! Reserved Words Defines
#INSERT(%PreambleCombined) #! Basic copyright message
#!---------------------------------------------------------------------
#!SHEET,HSCROLL,AT(,,288)
#SHEET,HSCROLL,AT(,,464)
#INSERT(%ShowVariables)
#INSERT(%MITLicenseD2M2MSSQL) #! RA.2019.10.11: Changed
#INSERT(%MetabaseTabSelection) #! RA.2019.07.04: Added FILE selection
#INSERT(%MetabaseTabNames)
#INSERT(%MetabaseTabCreateDropOther)
#INSERT(%MetabaseTabCreateDropScripting) #! RA.2019.07.28: Added
#INSERT(%MetabaseTabOptions)
#INSERT(%MetabaseTabStrings)
#INSERT(%MetabaseTabArrays)
#ENDSHEET
#!---------------------------------------------------------------------
#! START EXECUTION HERE
#!---------------------------------------------------------------------
#!#DECLARE(%DebugSet,LONG)
#!#SET(%DebugSet,1)
#!#DEBUG(%DebugSet)
#!
#CALL(%CombinedGenerate,%BaseName) #! DDL scripts for backend
#!
#!#SET(%DebugSet,0)
#!#DEBUG(%DebugSet)
#!---------------------------------------------------------------------
#! END EXECUTION HERE
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------
#!---------------------------------------------------------------------