Skip to content
Advertisement

Using CTE and Update in Redshift

I am converting some SQL Logic from T-SQL used in SSMS to Amazon Redshift. I believe Redshift is a fork of Postgres version 8.0.2 so the below may not be possible unless using Postgres 9.1.

If this feature is not supported by Amazon Redshift, would my best option be to create a new “temporary” table and populate it with the values the CTE would generate?

Advertisement

Answer

You can re-write the query as a derived table as mentioned by @a_horse_with_no_name:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement