can we use cursors in bteqs

Database
Enthusiast

can we use cursors in bteqs

Hi all,
I want to use cursors in bteqs ,can i use ,please tell me the syntax and other things.....
or could you tell me how to use result from a query in bteq and using in if/else condition in same bteq.
Thnaks and regards,
Kapil
6 REPLIES
Enthusiast

Re: can we use cursors in bteqs

BTEQ doesn't support cursors.
Enthusiast

Re: can we use cursors in bteqs

If BTEQ does not support cursors, can anyone please tell me what is the teradata equivalent which I can use in a bteq?
Enthusiast

Re: can we use cursors in bteqs

There is no cursor equivalent in BTEQ. Teradata supports standard SQL cursors, but only in stored procedures or applications using one of the standard APIs (e.g., ODBC, JDBC). You could write a stored procedure and call it from a BTEQ script.

On a practical note, cursors are best avoided whenever possible if you want decent performance with Teradata. Often, the thing you are trying to accomplish with a cursor can be done more efficiently with some other technique, such as a correlated subquery.
Enthusiast

Re: can we use cursors in bteqs

I have to perform the below action.Could you please let me know the best way to do it in teradata.

Taking the databasename as input I am supposed to find the minimum value of all the columns in all the tables present under hat database.

Can anyone please tell how I can do this using stored procedure/ cursor or any other way?

Re: can we use cursors in bteqs

Can anyone please tell me how to collect the tables from bteqs automatically.

Re: can we use cursors in bteqs

I dont think Bteq support cursors