All Forums Database
SGIT 8 posts Joined 08/16
30 Aug 2016
Replacing table

Hello,
 
In SAS if a new table A is created using the table A itself, the new table will overwrite the old. Can you pl let me know if same is the case in TD. -
 
create volatile table emp as
( select a.*
from emp a
left outer join company b
on a.id = b.id
)
with data and stats
on commit preserve rows
;
 
Will my newly created emp table replace the old one ?
 
Thanks
 
 
 

Glass 225 posts Joined 04/10
30 Aug 2016

If emp exists your query will fail.
To replace , drop old first.
 
Rlgass

nealvenna 9 posts Joined 10/12
31 Aug 2016

SAS work tables and Teradata Volatile tables are similar in a way that both exists only for Session.  SAS allows to replace tables if they already exist, Teradata does not. You need to do what Rglass suggests that is to drop if table already exist.

You must sign in to leave a comment.