IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_bdm_lqpt_log' AND KSQL_COL_NAME ='FORG')
 ALTER TABLE t_bdm_lqpt_log ADD (FORG BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_bdm_lqpt_sxed_log' AND KSQL_COL_NAME ='FORG')
 ALTER TABLE t_bdm_lqpt_sxed_log ADD (FORG BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_bdm_lqpt_sxed' AND KSQL_COL_NAME ='FORG')
 ALTER TABLE t_bdm_lqpt_sxed ADD (FORG BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_bdm_lqpt_invoiceno' AND KSQL_COL_NAME ='FORG')
 ALTER TABLE t_bdm_lqpt_invoiceno ADD (FORG BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_bdm_lqpt_yfm' AND KSQL_COL_NAME ='FORG')
 ALTER TABLE t_bdm_lqpt_yfm ADD (FORG BIGINT DEFAULT 0 NOT NULL );

