how to do select from volatile-land so I dont get ambiguous error?

General
Highlighted
Enthusiast

how to do select from volatile-land so I dont get ambiguous error?

--Step 1: in Teradata Sql Assistant, I create a volatile table as shown below.

--Step 2: I do "select from customer" and I get "ambiguous error"

 

--Q: How do I specify to make the SELECT get it from Volatile-Land? Otherwise I end up making fake names like "bueler_customer" to make it work... Thanks! You guys are the best!

 

create volatile set table customer as (
select
cst.cust_acct_nbr
from
prod_db.customer cst
)
with data
primary index (cust_acct_nbr)
on commit preserve rows;

1 REPLY
Teradata Employee

Re: how to do select from volatile-land so I dont get ambiguous error?

The "different name" approach tends to be simplest.

But you can qualify the Volatile Table name with your own UserName (assuming you don't also have a "regular" table with that name defined in your own database).