if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TTDESZCAPS11]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TTDESZCAPS11]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TTDESZCAPS01]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TTDESZCAPS01]
GO

CREATE TABLE [dbo].[TTDESZCAPS11] (
	[RUTTNR] [char] (10) NULL ,
	[SEIRU] [char] (10) NULL ,
	[ANTPAL] [float] NULL ,
	[ANTKOL] [float] NULL ,
	[WGHT] [float] NULL ,
	[ID] [char] (10) NOT NULL ,
	[CARRIER] [char] (10) NULL ,
	[LOADDATE] [char] (20) NULL ,
	[HUB] [char] (10) NULL ,
	[CADRT] [char] (10) NULL ,
	[ANTKM] [float] NULL ,
	[CADRF] [char] (10) NULL ,
	[TOTTID] [float] NULL ,
	[CARKOST] [float] NULL ,
	[HANDL] [char] (1) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[TTDESZCAPS01] (
	[ID] [char] (10) NOT NULL ,
	[CADRF] [char] (10) NOT NULL ,
	[CADRT] [char] (10) NOT NULL ,
	[NAMAF] [char] (70) NOT NULL ,
	[NAMEF] [char] (70) NOT NULL ,
	[PSTCF] [char] (10) NOT NULL ,
	[NAMCF] [char] (30) NOT NULL ,
	[NAMC2F] [char] (30) NOT NULL ,
	[CCTYF] [char] (10) NOT NULL ,
	[TYPEF] [char] (10) NOT NULL ,
	[CUNOT] [char] (10) NOT NULL ,
	[NAMAT] [char] (70) NOT NULL ,
	[NAMET] [char] (70) NOT NULL ,
	[PSTCT] [char] (10) NOT NULL ,
	[NAMCT] [char] (30) NOT NULL ,
	[NAMC2T] [char] (30) NOT NULL ,
	[CCTYT] [char] (10) NOT NULL ,
	[TYPET] [char] (10) NOT NULL ,
	[VAPPO] [float] NOT NULL ,
	[VTOTWT] [float] NOT NULL ,
	[VAKPO] [float] NOT NULL ,
	[OTYP] [char] (10) NOT NULL ,
	[PAD] [char] (20) NOT NULL ,
	[PAT] [char] (20) NOT NULL ,
	[PBD] [char] (20) NOT NULL ,
	[PBT] [char] (20) NOT NULL ,
	[DAD] [char] (20) NOT NULL ,
	[DAT] [char] (20) NOT NULL ,
	[DBD] [char] (20) NOT NULL ,
	[DBT] [char] (20) NOT NULL ,
	[PTYP] [char] (10) NOT NULL ,
	[MSG] [char] (20) NULL ,
	[HANDL] [char] (1) NULL ,
	[VCRED] [datetime] NULL ,
	[VCRET] [numeric](28, 0) NULL ,
	[VHAND] [datetime] NULL ,
	[VHANT] [numeric](18, 0) NULL ,
	[REFCNTU] [numeric](18, 0) NULL ,
	[REFCNTD] [numeric](18, 0) NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TTDESZCAPS01] WITH NOCHECK ADD 
	CONSTRAINT [PK_TTDESZCAPS01] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

