Stored Procedure Vs Bteq

Database
Enthusiast

Stored Procedure Vs Bteq

Hi All,

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

Thanks

R.Rajeev

6 REPLIES
Enthusiast

Re: Stored Procedure Vs Bteq

Hi All,

Can anyoone please provide some insight on the above question

looking forward !!

Thanks

R.Rajeev

Enthusiast

Re: Stored Procedure Vs Bteq

Hi All,

Any help on the above would be very useful.

looking forward

Thanks

R.Rajeev

Enthusiast

Re: Stored Procedure Vs Bteq

"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"

Highlighted
Enthusiast

Re: Stored Procedure Vs Bteq

Hi Sudheer

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

Regards

R.Rajeev

Enthusiast

Re: Stored Procedure Vs Bteq

@Rajeev:

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???

Teradata Employee

Re: Stored Procedure Vs Bteq

Few coming in my mind would be ....

BTEQ script:

Simplistic conditional logic

No exception handling

Runs on CLI connection

No concept of parameters

SP:

Complex conditional logic

Exception handlers

Pre-compiled

Parameters supported

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.

HTH!