Skip to content
Advertisement

Table Aliases into Subqueries

(Submitting here to assist other Snowflake Users who may run into similar challenges… Interested to see if there are any additional recommendations beyond what’s bee provided already.)

Why doesn’t table alias work into subqueries?

I was using a sample table select query but it doesn’t work when I coded a table alias.

I got a SQL compilation error: Object 'T' does not exist.

is not possible to use table alias?

Advertisement

Answer

(Previously provided by Mike Walton, a tenured member of Snowflake’s Professional Services team)

You can, but not that way. You should use a CTE, instead:

Any other ideas and/or recommendations?

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