|
|
Archives of the TeradataForum
Message Posted: Fri, 10 Nov 2006 @ 20:33:56 GMT
Subj: | | Re: Dropping a table from sql assistant |
|
From: | | Victor Sokovin |
| It didn't want to work in SQL Assistant. It immediately kicked out of the query and posted the error in the history window, instead of
running the GOTO statement. I'm used to using an IF EXISTS (select tablename) THEN DROP TABLE, as I normally use SQL Server. | |
Randall, the syntax of the scripting language you looked up in the archives will work only in BTEQ. This statement might be slightly incorrect
in general as exotic utilities such as ITEQ and the DBA-only tools might also support some scripting but for an "average" user the statement is
pretty much correct.
I'd say it is unusual to run scripts via SQLA. It is primarily used for interactive work. It does support some import/export "tasks" but I have
not seen it used in the kind of scripts you described. One might find possible to write, say, a perl script which would make calls to SQLA and
handle the output but one must have a very good reason to do it. ODBC only access to Teradata, for example, might be the situation when you need
to consider this but then you should probably consider using the ODBC driver and ODBC API directly, without SQLA.
If you could mention the reason why you cannot use BTEQ and / or what exactly you want to achieve in your script besides dropping the table,
the probability of Forum members suggesting alternative solutions would be higher.
Regards,
Victor
| |