CREATE TABLE FISSALDOCUE ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_FISSALDOCUE PRIMARY KEY CLUSTERED (SAL_COD,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_FISSALDOCUESAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_FISSALDOCUESAL_COD CHECK ((len([SAL_COD])>(0))))
CREATE TABLE FISSALDOCUECC ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_FISSALDOCUECC PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_NIT,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_FISSALDOCUECCSAL_CC CHECK ((len([SAL_CC])>(0))),
 CONSTRAINT CK_FISSALDOCUECCSAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_FISSALDOCUECCSAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_FISSALDOCUECCSAL_NIT CHECK ((len([SAL_NIT])>(0))))
CREATE TABLE FISSALDOCUECTA ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CTA VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_FISSALDOCUECTA PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_CTA,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_FISSALDOCUECTASAL_CC CHECK ((len([SAL_CC])>(0))),
 CONSTRAINT CK_FISSALDOCUECTASAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_FISSALDOCUECTASAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_FISSALDOCUECTASAL_CTA CHECK ((len([SAL_CTA])>(0))))
CREATE TABLE FISSALDOCUENIT ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_AGE VARCHAR(9) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_FISSALDOCUENIT PRIMARY KEY CLUSTERED (SAL_COD,SAL_NIT,SAL_AGE,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_FISSALDOCUENITSAL_AGE CHECK ((len([SAL_AGE])>(0))),
 CONSTRAINT CK_FISSALDOCUENITSAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_FISSALDOCUENITSAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_FISSALDOCUENITSAL_NIT CHECK ((len([SAL_NIT])>(0))))
CREATE TABLE NIIFSALDOCUE ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_NIIFSALDOCUE PRIMARY KEY CLUSTERED (SAL_COD,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_NIIFSALDOCUESAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_NIIFSALDOCUESAL_COD CHECK ((len([SAL_COD])>(0))))
CREATE TABLE NIIFSALDOCUECC ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_NIIFSALDOCUECC PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_NIT,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_NIIFSALDOCUECCSAL_CC CHECK ((len([SAL_CC])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECCSAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECCSAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECCSAL_NIT CHECK ((len([SAL_NIT])>(0))))
CREATE TABLE NIIFSALDOCUECTA ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CTA VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_NIIFSALDOCUECTA PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_CTA,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_NIIFSALDOCUECTASAL_CC CHECK ((len([SAL_CC])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECTASAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECTASAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_NIIFSALDOCUECTASAL_CTA CHECK ((len([SAL_CTA])>(0))))
CREATE TABLE NIIFSALDOCUENIT ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_AGE VARCHAR(9) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO INT NOT NULL,
SAL_AAD MONEY DEFAULT ((0)),
SAL_AAC MONEY DEFAULT ((0)),
SAL_SAA MONEY DEFAULT ((0)),
SAL_01D MONEY DEFAULT ((0)),
SAL_01C MONEY DEFAULT ((0)),
SAL_ENE MONEY DEFAULT ((0)),
SAL_02D MONEY DEFAULT ((0)),
SAL_02C MONEY DEFAULT ((0)),
SAL_FEB MONEY DEFAULT ((0)),
SAL_03D MONEY DEFAULT ((0)),
SAL_03C MONEY DEFAULT ((0)),
SAL_MAR MONEY DEFAULT ((0)),
SAL_04D MONEY DEFAULT ((0)),
SAL_04C MONEY DEFAULT ((0)),
SAL_ABR MONEY DEFAULT ((0)),
SAL_05D MONEY DEFAULT ((0)),
SAL_05C MONEY DEFAULT ((0)),
SAL_MAY MONEY DEFAULT ((0)),
SAL_06D MONEY DEFAULT ((0)),
SAL_06C MONEY DEFAULT ((0)),
SAL_JUN MONEY DEFAULT ((0)),
SAL_07D MONEY DEFAULT ((0)),
SAL_07C MONEY DEFAULT ((0)),
SAL_JUL MONEY DEFAULT ((0)),
SAL_08D MONEY DEFAULT ((0)),
SAL_08C MONEY DEFAULT ((0)),
SAL_AGO MONEY DEFAULT ((0)),
SAL_09D MONEY DEFAULT ((0)),
SAL_09C MONEY DEFAULT ((0)),
SAL_SEP MONEY DEFAULT ((0)),
SAL_10D MONEY DEFAULT ((0)),
SAL_10C MONEY DEFAULT ((0)),
SAL_OCT MONEY DEFAULT ((0)),
SAL_11D MONEY DEFAULT ((0)),
SAL_11C MONEY DEFAULT ((0)),
SAL_NOV MONEY DEFAULT ((0)),
SAL_12D MONEY DEFAULT ((0)),
SAL_12C MONEY DEFAULT ((0)),
SAL_DIC MONEY DEFAULT ((0)),
SAL_CID MONEY DEFAULT ((0)),
SAL_CIC MONEY DEFAULT ((0)),
SAL_CIE MONEY DEFAULT ((0))
 CONSTRAINT PK_NIIFSALDOCUENIT PRIMARY KEY CLUSTERED (SAL_COD,SAL_NIT,SAL_AGE,SAL_CIA,SAL_ANO),
 CONSTRAINT CK_NIIFSALDOCUENITSAL_AGE CHECK ((len([SAL_AGE])>(0))),
 CONSTRAINT CK_NIIFSALDOCUENITSAL_CIA CHECK ((len([SAL_CIA])>(0))),
 CONSTRAINT CK_NIIFSALDOCUENITSAL_COD CHECK ((len([SAL_COD])>(0))),
 CONSTRAINT CK_NIIFSALDOCUENITSAL_NIT CHECK ((len([SAL_NIT])>(0))))
CREATE TABLE SALDOANT ( 
SAL_NIT VARCHAR(11) NOT NULL,
SAL_VEH VARCHAR(10) NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOANT PRIMARY KEY CLUSTERED (SAL_NIT,SAL_VEH,SAL_ANO,SAL_CIA),
 CONSTRAINT CK__SALDOANT__SAL_CI__7B905C75 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOANT__SAL_NI__77BFCB91 CHECK ((len([SAL_NIT]) > 0)),
 CONSTRAINT CK__SALDOANT__SAL_VE__78B3EFCA CHECK ((len([SAL_VEH]) > 0)))
CREATE TABLE SALDOCAJA ( 
SAL_FEC SMALLDATETIME NOT NULL,
SAL_USU VARCHAR(8) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_DEB MONEY DEFAULT (0),
SAL_CRE MONEY DEFAULT (0),
SAL_SAL MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCAJA PRIMARY KEY CLUSTERED (SAL_FEC,SAL_USU,SAL_CIA),
 CONSTRAINT CK__SALDOCAJA__SAL_C__25869641 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOCAJA__SAL_U__239E4DCF CHECK ((len([SAL_USU]) > 0)))
CREATE TABLE SALDOCLI ( 
SAL_NIT VARCHAR(11) NOT NULL,
SAL_AGE VARCHAR(9) DEFAULT ('N') NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCLI PRIMARY KEY CLUSTERED (SAL_NIT,SAL_AGE,SAL_ANO,SAL_CIA),
 CONSTRAINT CK__SALDOCLI__SAL_AG__2D27B809 CHECK ((len([SAL_AGE]) > 0)),
 CONSTRAINT CK__SALDOCLI__SAL_CI__300424B4 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOCLI__SAL_NI__2B3F6F97 CHECK ((len([SAL_NIT]) > 0)))
CREATE TABLE SALDOCUE ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0),
SAL_CID MONEY DEFAULT (0),
SAL_CIC MONEY DEFAULT (0),
SAL_CIE MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCUE PRIMARY KEY CLUSTERED (SAL_COD,SAL_CIA,SAL_ANO),
 CONSTRAINT CK__SALDOCUE__SAL_CI__5DCAEF64 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOCUE__SAL_CO__5812160E CHECK ((len([SAL_COD]) > 0)))
CREATE TABLE SALDOCUECC ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0),
SAL_CID MONEY DEFAULT (0),
SAL_CIC MONEY DEFAULT (0),
SAL_CIE MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCUECC PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_NIT,SAL_CIA,SAL_ANO),
 CONSTRAINT CK__SALDOCUEC__SAL_C__11D4A34F CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_C__13BCEBC1 CHECK ((len([SAL_CC]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_C__178D7CA5 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_N__15A53433 CHECK ((len([SAL_NIT]) > 0)))
CREATE TABLE SALDOCUECTA ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_CC VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CTA VARCHAR(3) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0),
SAL_CID MONEY DEFAULT (0),
SAL_CIC MONEY DEFAULT (0),
SAL_CIE MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCUECTA PRIMARY KEY CLUSTERED (SAL_COD,SAL_CC,SAL_CTA,SAL_CIA,SAL_ANO),
 CONSTRAINT CK__SALDOCUEC__SAL_C__436BFEE3 CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_C__45544755 CHECK ((len([SAL_CC]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_C__473C8FC7 CHECK ((len([SAL_CTA]) > 0)),
 CONSTRAINT CK__SALDOCUEC__SAL_C__4924D839 CHECK ((len([SAL_CIA]) > 0)))
CREATE TABLE SALDOCUENIT ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_NIT VARCHAR(11) DEFAULT ('N') NOT NULL,
SAL_AGE VARCHAR(9) DEFAULT ('N') NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_AAD MONEY DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA MONEY DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE MONEY DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB MONEY DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR MONEY DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR MONEY DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY MONEY DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN MONEY DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL MONEY DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO MONEY DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP MONEY DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT MONEY DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV MONEY DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC MONEY DEFAULT (0),
SAL_CID MONEY DEFAULT (0),
SAL_CIC MONEY DEFAULT (0),
SAL_CIE MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOCUENIT PRIMARY KEY CLUSTERED (SAL_COD,SAL_NIT,SAL_AGE,SAL_CIA,SAL_ANO),
 CONSTRAINT CK__SALDOCUEN__SAL_A__78D3EB5B CHECK ((len([SAL_AGE]) > 0)),
 CONSTRAINT CK__SALDOCUEN__SAL_C__75035A77 CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOCUEN__SAL_C__7ABC33CD CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOCUEN__SAL_N__76EBA2E9 CHECK ((len([SAL_NIT]) > 0)))
CREATE TABLE SALDOLOTE ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_SEC VARCHAR(3) NOT NULL,
SAL_NUM VARCHAR(20) NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_SAA DECIMAL(14,4) DEFAULT (0),
SAL_ENE DECIMAL(14,4) DEFAULT (0),
SAL_FEB DECIMAL(14,4) DEFAULT (0),
SAL_MAR DECIMAL(14,4) DEFAULT (0),
SAL_ABR DECIMAL(14,4) DEFAULT (0),
SAL_MAY DECIMAL(14,4) DEFAULT (0),
SAL_JUN DECIMAL(14,4) DEFAULT (0),
SAL_JUL DECIMAL(14,4) DEFAULT (0),
SAL_AGO DECIMAL(14,4) DEFAULT (0),
SAL_SEP DECIMAL(14,4) DEFAULT (0),
SAL_OCT DECIMAL(14,4) DEFAULT (0),
SAL_NOV DECIMAL(14,4) DEFAULT (0),
SAL_DIC DECIMAL(14,4) DEFAULT (0)
 CONSTRAINT PK_SALDOLOTE PRIMARY KEY CLUSTERED (SAL_COD,SAL_SEC,SAL_NUM,SAL_ANO,SAL_CIA),
 CONSTRAINT CK__SALDOLOTE__SAL_C__09A971A2 CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOLOTE__SAL_C__0E6E26BF CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOLOTE__SAL_N__0B91BA14 CHECK ((len([SAL_NUM]) > 0)),
 CONSTRAINT CK__SALDOLOTE__SAL_S__0A9D95DB CHECK ((len([SAL_SEC]) > 0)))
CREATE TABLE SALDOREF ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_SEC VARCHAR(3) NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_AAE DECIMAL(14,4) DEFAULT (0),
SAL_AAD MONEY DEFAULT (0),
SAL_AAS DECIMAL(14,4) DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA DECIMAL(14,4) DEFAULT (0),
SAL_SAAC MONEY DEFAULT (0),
SAL_01E DECIMAL(14,4) DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01S DECIMAL(14,4) DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE DECIMAL(14,4) DEFAULT (0),
SAL_ENEC MONEY DEFAULT (0),
SAL_02E DECIMAL(14,4) DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02S DECIMAL(14,4) DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB DECIMAL(14,4) DEFAULT (0),
SAL_FEBC MONEY DEFAULT (0),
SAL_03E DECIMAL(14,4) DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03S DECIMAL(14,4) DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR DECIMAL(14,4) DEFAULT (0),
SAL_MARC MONEY DEFAULT (0),
SAL_04E DECIMAL(14,4) DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04S DECIMAL(14,4) DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR DECIMAL(14,4) DEFAULT (0),
SAL_ABRC MONEY DEFAULT (0),
SAL_05E DECIMAL(14,4) DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05S DECIMAL(14,4) DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY DECIMAL(14,4) DEFAULT (0),
SAL_MAYC MONEY DEFAULT (0),
SAL_06E DECIMAL(14,4) DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06S DECIMAL(14,4) DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN DECIMAL(14,4) DEFAULT (0),
SAL_JUNC MONEY DEFAULT (0),
SAL_07E DECIMAL(14,4) DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07S DECIMAL(14,4) DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL DECIMAL(14,4) DEFAULT (0),
SAL_JULC MONEY DEFAULT (0),
SAL_08E DECIMAL(14,4) DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08S DECIMAL(14,4) DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO DECIMAL(14,4) DEFAULT (0),
SAL_AGOC MONEY DEFAULT (0),
SAL_09E DECIMAL(14,4) DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09S DECIMAL(14,4) DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP DECIMAL(14,4) DEFAULT (0),
SAL_SEPC MONEY DEFAULT (0),
SAL_10E DECIMAL(14,4) DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10S DECIMAL(14,4) DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT DECIMAL(14,4) DEFAULT (0),
SAL_OCTC MONEY DEFAULT (0),
SAL_11E DECIMAL(14,4) DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11S DECIMAL(14,4) DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV DECIMAL(14,4) DEFAULT (0),
SAL_NOVC MONEY DEFAULT (0),
SAL_12E DECIMAL(14,4) DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12S DECIMAL(14,4) DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC DECIMAL(14,4) DEFAULT (0),
SAL_DICC MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOREF PRIMARY KEY CLUSTERED (SAL_COD,SAL_SEC,SAL_ANO,SAL_CIA),
 CONSTRAINT CK__SALDOREF__SAL_CI__2180FB33 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOREF__SAL_CO__1DB06A4F CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOREF__SAL_SE__1EA48E88 CHECK ((len([SAL_SEC]) > 0)))
CREATE TABLE SALDOTAN ( 
SAL_COD VARCHAR(16) NOT NULL,
SAL_TAN VARCHAR(3) NOT NULL,
SAL_ANO SMALLINT DEFAULT (0) NOT NULL,
SAL_CIA CHAR(2) DEFAULT ('01') NOT NULL,
SAL_AAE DECIMAL(14,4) DEFAULT (0),
SAL_AAD MONEY DEFAULT (0),
SAL_AAS DECIMAL(14,4) DEFAULT (0),
SAL_AAC MONEY DEFAULT (0),
SAL_SAA DECIMAL(14,4) DEFAULT (0),
SAL_SAAC MONEY DEFAULT (0),
SAL_01E DECIMAL(14,4) DEFAULT (0),
SAL_01D MONEY DEFAULT (0),
SAL_01S DECIMAL(14,4) DEFAULT (0),
SAL_01C MONEY DEFAULT (0),
SAL_ENE DECIMAL(14,4) DEFAULT (0),
SAL_ENEC MONEY DEFAULT (0),
SAL_02E DECIMAL(14,4) DEFAULT (0),
SAL_02D MONEY DEFAULT (0),
SAL_02S DECIMAL(14,4) DEFAULT (0),
SAL_02C MONEY DEFAULT (0),
SAL_FEB DECIMAL(14,4) DEFAULT (0),
SAL_FEBC MONEY DEFAULT (0),
SAL_03E DECIMAL(14,4) DEFAULT (0),
SAL_03D MONEY DEFAULT (0),
SAL_03S DECIMAL(14,4) DEFAULT (0),
SAL_03C MONEY DEFAULT (0),
SAL_MAR DECIMAL(14,4) DEFAULT (0),
SAL_MARC MONEY DEFAULT (0),
SAL_04E DECIMAL(14,4) DEFAULT (0),
SAL_04D MONEY DEFAULT (0),
SAL_04S DECIMAL(14,4) DEFAULT (0),
SAL_04C MONEY DEFAULT (0),
SAL_ABR DECIMAL(14,4) DEFAULT (0),
SAL_ABRC MONEY DEFAULT (0),
SAL_05E DECIMAL(14,4) DEFAULT (0),
SAL_05D MONEY DEFAULT (0),
SAL_05S DECIMAL(14,4) DEFAULT (0),
SAL_05C MONEY DEFAULT (0),
SAL_MAY DECIMAL(14,4) DEFAULT (0),
SAL_MAYC MONEY DEFAULT (0),
SAL_06E DECIMAL(14,4) DEFAULT (0),
SAL_06D MONEY DEFAULT (0),
SAL_06S DECIMAL(14,4) DEFAULT (0),
SAL_06C MONEY DEFAULT (0),
SAL_JUN DECIMAL(14,4) DEFAULT (0),
SAL_JUNC MONEY DEFAULT (0),
SAL_07E DECIMAL(14,4) DEFAULT (0),
SAL_07D MONEY DEFAULT (0),
SAL_07S DECIMAL(14,4) DEFAULT (0),
SAL_07C MONEY DEFAULT (0),
SAL_JUL DECIMAL(14,4) DEFAULT (0),
SAL_JULC MONEY DEFAULT (0),
SAL_08E DECIMAL(14,4) DEFAULT (0),
SAL_08D MONEY DEFAULT (0),
SAL_08S DECIMAL(14,4) DEFAULT (0),
SAL_08C MONEY DEFAULT (0),
SAL_AGO DECIMAL(14,4) DEFAULT (0),
SAL_AGOC MONEY DEFAULT (0),
SAL_09E DECIMAL(14,4) DEFAULT (0),
SAL_09D MONEY DEFAULT (0),
SAL_09S DECIMAL(14,4) DEFAULT (0),
SAL_09C MONEY DEFAULT (0),
SAL_SEP DECIMAL(14,4) DEFAULT (0),
SAL_SEPC MONEY DEFAULT (0),
SAL_10E DECIMAL(14,4) DEFAULT (0),
SAL_10D MONEY DEFAULT (0),
SAL_10S DECIMAL(14,4) DEFAULT (0),
SAL_10C MONEY DEFAULT (0),
SAL_OCT DECIMAL(14,4) DEFAULT (0),
SAL_OCTC MONEY DEFAULT (0),
SAL_11E DECIMAL(14,4) DEFAULT (0),
SAL_11D MONEY DEFAULT (0),
SAL_11S DECIMAL(14,4) DEFAULT (0),
SAL_11C MONEY DEFAULT (0),
SAL_NOV DECIMAL(14,4) DEFAULT (0),
SAL_NOVC MONEY DEFAULT (0),
SAL_12E DECIMAL(14,4) DEFAULT (0),
SAL_12D MONEY DEFAULT (0),
SAL_12S DECIMAL(14,4) DEFAULT (0),
SAL_12C MONEY DEFAULT (0),
SAL_DIC DECIMAL(14,4) DEFAULT (0),
SAL_DICC MONEY DEFAULT (0)
 CONSTRAINT PK_SALDOTAN PRIMARY KEY CLUSTERED (SAL_COD,SAL_TAN,SAL_ANO,SAL_CIA),
 CONSTRAINT CK__SALDOTAN__SAL_CI__72910220 CHECK ((len([SAL_CIA]) > 0)),
 CONSTRAINT CK__SALDOTAN__SAL_CO__6EC0713C CHECK ((len([SAL_COD]) > 0)),
 CONSTRAINT CK__SALDOTAN__SAL_TA__6FB49575 CHECK ((len([SAL_TAN]) > 0)))
GO
