BTEQ uses CLIv2 while SQL Assistant uses ODBC driver to connect to Teradata Server.The basic difference between the two is that BTEQ is a command driven utility while SQL Assistant is a GUI.Both used to submit queries to Teradat.
BTEQ has its own command using which you can create and run scripts to run queries in a batch.BTEQ supports conditional logic (IF..THEN construct).
Besides Very useful information provided by Jim.. BTEQ can be run in a batch mode for exportin,importing (small volumes of data). I can also be used to run useful reports. It can be installed both on Unix and Windows machine.
While SQL assistant does allow import/exports but I find BTEQ to be more useful.
Like to add that BTEQ supports Teradata Specific SQL such as OLAP Function( With by , With, RANK etc), which are not supported by any client utility connected using ODBC. Although there are other equivalent functions available for ODBC, but using ODBC always produces a relational output.
"Bteq" script is nothing but a bunch of SQLs and any other Bteq commands (like logon, transaction mode, width etc etc .... ) wrapped in a file. (most of us save it with an extension of .bteq but it doesn't matter).
This is mostly useful for batch processing when you can put in all the SQLs and bteq command in a file and use bteq to run it from a scheduler ...
Bteq has no scheduler, it's just a utility to execute SQLS, do a little bit of formating, export/import small scale data and capable of doing teeny-weeny if else conditions. ... nothing more (that I could remember :o) ...
you will have to use a scheduler to run bteq scripts at a certain time ... like cron/at in unix, windows scheduler etc ... (and tones of other third party schedulers available out there)
Hi, After all the things said in the past replies, I noticed one major point missing in the replies which is a major difference between the 2 tools mentioned:
1. Conditional logic can be applied in BTEQ whereas SQL Assitant can use only single statements with no conditional logic (.if statements). 2. The output of BTEQ reult sets are more proper to formatting statements. Any formatting applied to BTEQ outputs are exactly as specified. Whereas SQL Assitant applies its own formatting to the result set. Hence you cannot assure that the format of the string from SQL Assitant is the right one as specified in the outputting call string. 3. The import or export facility is very bare minimal in SQL Assitant whereas BTEQ's import export functionality is much more versatile and flexible and programmable.
A BTEQ script is nothing but a simple file in UNIX or Windows environment which can be run using the following command: bteq < infle > outfile where infile is the BTEQ script and outfile is the output or log file. Now how you call the BTEQ command above is your option whether you use a cron or scheduler or do a one time prompt call etc.