The sql below I can use in Teradata just fine, but not in my Custom SQL. What I would like to do is have the database searched for a table and if it's there (EXISTS) to drop it so a new table gets created (Initial sql). If It is not there, then it will get created. Any ideas?
SELECT 1 FROM dbc.TablesV WHERE databasename = 'enter name' AND TABLENAME = 'enter name';
IF ACTIVITYCOUNT = 0 THEN GOTO ok DROP TABLE FullTableName; LABEL ok
Hi Althea, I doubt Tableau's Initial SQL functionality can handle Teradata's BTEQ functions - the IF ACTIVITYCOUNT = 0 THEN GOTO would have to be handled in a batch process outside of Tableau, assuming you have the Teradata BTEQ utility installed.