I tried creating a table that didn't work, then I try updating a Table that didn't work. Teradata VS Oracle very different.
Please some help as I am lost No Syntax is working.
UPDATE temp1
SET temp1.Q1Count = temp2.Q1Count
FROM temp1
INNER JOIN
(
SELECT CAST(RP.REGIS_DATETM AS DATE) AS MyDate,
COUNT(DISTINCT RP.REGIS_PRSNA_ID) AS Q1Count
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 CAST (RP.REGIS_DATETM AS DATE)
) temp2
ON temp1.MyDate = temp2.MyDate;
What is wrong with this SYNTAX? UPDATE Failed 3706: Syntax error:
Expected something between the word 'Q1Count' and the 'FROM' keyword.
Please help.
MSB
I tried creating a table that didn't work, then I try updating a Table that didn't work. Teradata VS Oracle very different.
Please some help as I am lost No Syntax is working.
What is wrong with this SYNTAX? UPDATE Failed 3706: Syntax error:
Expected something between the word 'Q1Count' and the 'FROM' keyword.
Please help.
MSB