IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[flatDSS]') AND type = 'U')
CREATE TABLE [dbo].[flatDSS]
(
    [dsID] int NOT NULL IDENTITY(1, 1),
    [parseid] int NULL,
    [predsname] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [pretbname] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [dsname] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [shortname] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [fullname] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [keyval] varchar(200) COLLATE Chinese_PRC_CI_AS NULL,
    [biztype] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [bizid] int NULL DEFAULT((0)),
    [tagid] int NULL DEFAULT((0)),
    [canbizchange] int NULL DEFAULT((0)),
    [preLnkFld] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [tbName] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [keyfld] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [prekeyfld] varchar(20) COLLATE Chinese_PRC_CI_AS NULL,
    [dschain] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [isDetailTable] int NULL DEFAULT((0)),
    [isDTPost] int NULL DEFAULT((0)),
    [orderNum] int NULL DEFAULT((0)),
    [row] int NULL DEFAULT((0)),
    [col] int NULL DEFAULT((0)),
    [idParamVar] varchar(50) COLLATE Chinese_PRC_CI_AS NULL,
    [isLoaded] int NULL DEFAULT((0)),
    [sqlCond] varchar(200) COLLATE Chinese_PRC_CI_AS NULL,
    [sqlgrp] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [isUpper] int NULL,
    [isroot] int NULL,
    [forupdate] int NULL,
    [forInsert] int NULL,
    [fordelete] int NULL,
    [getOrder] int NULL,
    [tbDataBase] varchar(30) COLLATE Chinese_PRC_CI_AS NULL,
)