/**Begin D:\PDM\pdm_upgrade\pdm1\ER2_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_STAKEHOLDERBILL_L')
CREATE TABLE T_ER_STAKEHOLDERBILL_L (
                                        FPKID BIGINT DEFAULT 0 NOT NULL,
                                        FID BIGINT DEFAULT 0 NOT NULL,
                                        FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                        FAPPLIERPOSITION NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_STAKEHOLDERBILL_LK')
CREATE TABLE T_ER_STAKEHOLDERBILL_LK (
                                         FID BIGINT DEFAULT 0 NOT NULL,
                                         FPKID BIGINT DEFAULT 0 NOT NULL,
                                         FSEQ BIGINT DEFAULT 0 NOT NULL,
                                         FSTABLEID BIGINT DEFAULT 0 NOT NULL,
                                         FSBILLID BIGINT DEFAULT 0 NOT NULL,
                                         FSID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_STAKEHOLDERDETAIL_LK')
CREATE TABLE T_ER_STAKEHOLDERDETAIL_LK (
                                           FDETAILID BIGINT DEFAULT 0 NOT NULL,
                                           FPKID BIGINT DEFAULT 0 NOT NULL,
                                           FSEQ BIGINT DEFAULT 0 NOT NULL,
                                           FSTABLEID BIGINT DEFAULT 0 NOT NULL,
                                           FSBILLID BIGINT DEFAULT 0 NOT NULL,
                                           FSID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\PDM\pdm_upgrade\pdm1\ER2_table.sql **/
