IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_REDBLUE_RELATION')
 CREATE TABLE T_RIM_REDBLUE_RELATION (
FID BIGINT DEFAULT 0 NOT NULL,
FRED_INVOICE_CODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRED_INVOICE_NO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBLUE_INVOICE_CODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBLUE_INVOICE_NO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRED_TOTAL_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);