CREATE TABLE DOCSOPORTEDEV ( 
DSO_TIP VARCHAR(3) NOT NULL,
DSO_NUM INT DEFAULT ((0)) NOT NULL,
DSO_CIA CHAR(2) NOT NULL,
DSO_FEC SMALLDATETIME NOT NULL,
DSO_TDC VARCHAR(3) NOT NULL,
DSO_NDC INT DEFAULT ((0)) NOT NULL,
DSO_CDC CHAR(2) NOT NULL,
DSO_NIT VARCHAR(11) NOT NULL,
DSO_CON VARCHAR(3),
DSO_MOD VARCHAR(20),
DSO_FAC VARCHAR(15),
DSO_VAL DECIMAL(16,6) DEFAULT ((0)) NOT NULL,
DSO_DCT DECIMAL(16,6) DEFAULT ((0)),
DSO_RET DECIMAL(16,6) DEFAULT ((0)),
DSO_ICA DECIMAL(16,6) DEFAULT ((0)),
DSO_BOM DECIMAL(16,6) DEFAULT ((0)),
DSO_IAT DECIMAL(16,6) DEFAULT ((0)),
DSO_OTR DECIMAL(16,6) DEFAULT ((0)),
DSO_ODC DECIMAL(16,6) DEFAULT ((0)),
DSO_NET DECIMAL(16,6) DEFAULT ((0)),
DSO_CCT VARCHAR(3),
DSO_CUE VARCHAR(16),
DSO_NCP VARCHAR(11)
 CONSTRAINT PK_DOCSOPORTEDEV PRIMARY KEY CLUSTERED (DSO_TIP,DSO_NUM,DSO_CIA),
 CONSTRAINT CK_DOCSOPORTEDEVDSO_CDC CHECK ((len([DSO_CDC])>(0))),
 CONSTRAINT CK_DOCSOPORTEDEVDSO_CIA CHECK ((len([DSO_CIA])>(0))),
 CONSTRAINT CK_DOCSOPORTEDEVDSO_NIT CHECK ((len([DSO_NIT])>(0))),
 CONSTRAINT CK_DOCSOPORTEDEVDSO_TDC CHECK ((len([DSO_TDC])>(0))),
 CONSTRAINT CK_DOCSOPORTEDEVDSO_TIP CHECK ((len([DSO_TIP])>(0))))
GO