Oh, Barani I removed that statement but I still have the same issue Create Table Failed 3706 Syntax Error:expected something between the word "RP" and ".". and I have no idea @ what line #
create table TWM_SANDBOX.tbl1_frm_qry1 as
(
SELECT CAST (RP.REGIS_DATETM AS DATE), COUNT(DISTINCT RP.REGIS_PRSNA_ID)
FROM iCRM_LOAD.REGIS_PRSNA RP
INNER JOIN iCRM.MKTNG_PGM MP ON RP.MKTNG_PGM_NBR = MP.MKTNG_PGM_NBR
INNER JOIN iCRM.REGIS_PRSNA_EMAIL_ADDR RPE ON RP.REGIS_PRSNA_ID = RPE.REGIS_PRSNA_ID AND RP.MKTNG_PGM_NBR = RPE.MKTNG_PGM_NBR
WHERE RP.MKTNG_PGM_NBR IN (115) AND RPE.SUBSCRPTN_OPT_IND = 'I' AND RP.PRSNA_STATUS_CODE = 'AC'
AND RP.REGIS_DATETM BETWEEN (CURRENT_DATE -7) and CURRENT_DATE Group by RP.REGIS_DATETM
) With data primary index ( RP.REGIS_DATETM)
ON COMMIT PRESERVE ROWS;
Oh, Barani I removed that statement but I still have the same issue Create Table Failed 3706 Syntax Error:expected something between the word "RP" and ".". and I have no idea @ what line #
create table TWM_SANDBOX.tbl1_frm_qry1 as
(
SELECT CAST (RP.REGIS_DATETM AS DATE), COUNT(DISTINCT RP.REGIS_PRSNA_ID)
FROM
iCRM_LOAD.REGIS_PRSNA RP
INNER JOIN
iCRM.MKTNG_PGM MP
ON RP.MKTNG_PGM_NBR = MP.MKTNG_PGM_NBR
INNER JOIN
iCRM.REGIS_PRSNA_EMAIL_ADDR RPE
ON RP.REGIS_PRSNA_ID = RPE.REGIS_PRSNA_ID
AND RP.MKTNG_PGM_NBR = RPE.MKTNG_PGM_NBR
WHERE
RP.MKTNG_PGM_NBR IN (115)
AND RPE.SUBSCRPTN_OPT_IND = 'I'
AND RP.PRSNA_STATUS_CODE = 'AC'
AND RP.REGIS_DATETM BETWEEN (CURRENT_DATE -7) and CURRENT_DATE
Group by RP.REGIS_DATETM
) With data primary index ( RP.REGIS_DATETM)
ON COMMIT PRESERVE ROWS;