0

I am trying to run the update query below in Teradata but getting an error message 'Expecting something between ')' and the 'AS' keyword. I am missing anything? I have checked some previous update and it worked for other developers in my company.

 WHEN MATCHED THEN UPDATE SET


 PRSCRBR_LAST_NM = COALESCE(M.PRESCRIBER_LAST_NAME,'ZZZZ1') AS PRSCRBR_LAST_NM,

Thanks

Bond
  • 25
  • 2
  • 13
  • This appears to be just a fragment of some larger query, but in any case, you do have a dangling comma at the end there. – Tim Biegeleisen Sep 28 '20 at 14:46
  • This is just part, there are other update lines after that one, but this is the only line to be updated on which I am using the COALESCE, the lines after that are straight forward – Bond Sep 28 '20 at 14:54
  • 1
    You don't need to alias your update, get rid of the `as PRSCRB_LAST_NM`. – Andrew Sep 28 '20 at 16:18
  • Thanks everyone, Andrew's solution worked – Bond Sep 28 '20 at 16:41

0 Answers0