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