|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/13/2009 2:49:49 PM
Posts: 87,
Visits: 109
|
|
Can anyone tell me the difference btw running a query or set of query in sql assistant and BTEQ?
Regards,
TdMan
Do your duty Dont expect the reward, God will give the benefit for you
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 8/12/2009 6:03:17 PM
Posts: 177,
Visits: 64
|
|
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).
Leo Issac "Wants to Learn More!"
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 7/5/2009 2:58:22 PM
Posts: 134,
Visits: 13
|
|
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.
Thanks, Vinay Bagare
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/28/2008 12:04:31 PM
Posts: 9,
Visits: 7
|
|
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.
Thanks
Nisith Bhattacharya
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/13/2009 2:49:49 PM
Posts: 87,
Visits: 109
|
|
I found the replies very useful.
Next my doubt is do we have to instal any utility (BTEQ) to run the bteq queries or what is the means to run bteq scripts?
Regards,
TdMan
Do your duty Dont expect the reward, God will give the benefit for you
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 7/10/2009 6:28:52 PM
Posts: 505,
Visits: 546
|
|
"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 < processdata.bteq
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/13/2009 2:49:49 PM
Posts: 87,
Visits: 109
|
|
so does bteq have a scheduler in it? can we schedule the bteq scripts to our requirements using the bteq tool itself or get it done through the script in bteq?
Regards,
TdMan
Do your duty Dont expect the reward, God will give the benefit for you
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 7/10/2009 6:28:52 PM
Posts: 505,
Visits: 546
|
|
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)
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Yesterday @ 12:42:08 AM
Posts: 74,
Visits: 32
|
|
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.
Hope that helps.
Strive to success. Arun.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/13/2009 2:49:49 PM
Posts: 87,
Visits: 109
|
|
that was much clear explanation
Regards,
TdMan
Do your duty Dont expect the reward, God will give the benefit for you
|
|