0

I wrote a query where I misspelled the alias I was using (this is pseudocode)

SELECT
    ma.name
    FROM mytable my

Teradata SQL Assistant did not give its usual error message saying ma does not exist, but ran for a long time and spooled out. I believe Teradata was processing all the rows in mytable.

When I changed the column selector to my.name the query ran as expected.

My question is, is it possible to see what Teradata SQL Assistant thinks the value of ma is?
Is there some setting which might define the default value of ma?

ma is not a column name in mytable

Peter
  • 191
  • 1
  • 2
  • 9
  • 2
    See https://stackoverflow.com/questions/30353672/teradata-use-of-aliases-impacts-explain-estimation-of-time Try a `SHOW SELECT ...` which returns all objects accessed by a query (but it might fail depending on your access rights). – dnoeth Mar 01 '18 at 06:22
  • @dnoeth +1 Nice answer on the link – Peter Mar 03 '18 at 16:48

0 Answers0