Could any one tell the advantages and disadvantages of using SP and Bteq basically a comparison of both and the scenario
when one is prefered over another
My general understanding is the that unless there is need for conditional programming mostly Bteq is preferred
please help in understanding the two and when to choose one over the other
"BTEQ" (Basic Teradata Query) is a tool (Client) to compose queries (and to see results).
Where as "StoredProcedure" is a subroutine (a concept) in SQL.
These two cannot be compared.., Its like, comparing between "Dell" and "Adobe Photoshop"
Thanks for getting back !
Yeah i understand Bteq is a tool but what i meant was a comparison of the Bteq scripts and SP
there are things which can be accomplished using both a Bteq script in batch mode as well a SP , in that
case how does one weigh both and choose one over the other
I got your query now.
I am also a newbie in teradata.. May be we shall wait for some one to answer..
Anyone there to answer the query???
Few coming in my mind would be ....
Simplistic conditional logic
No exception handling
Runs on CLI connection
No concept of parameters
Complex conditional logic
Physical object in Database
Requires respective rights (depends on usage i.e. SQL used in SP)
If you have a repeated set of same SQL to be ran over and over again .... BTEQ is usually preffered due to ease of use and maintainability and also because BTEQ has been there since the early days of Teradata.
Whereas .... SP is for more dynamically variant scenarios where you wish to retain control based on the input. It is precompiled and no SQL parsing is required.
Both have alot of similar traits to offer .... but it comes to the comfort of the solution provider as well for selecting among the both.