All Forums Database
tomek_m 1 post Joined 12/08
23 Dec 2008
DECLARE variable like ROWTYPE in Teradata

How implementation in TERADATA "ROWTYPE"Sample in ORACLE:Declarev_emp emp%ROWTYPE;Thanks for helpTomek_123

Adeel Chaudhry 773 posts Joined 04/08
31 Dec 2008

Hello,You can use volatile/temporary tables instead.Regards,Adeel

-- If you are stuck at something .... consider it an opportunity to think anew.

rtefft 11 posts Joined 03/09
23 Mar 2009

Hello,%ROWTYPE in Oracle creates a structured variable with the same structure as the table definition it references. It can hold the equivalent of 1 row at a time when used as a fetch target for a cursor. Volatile tables in Teradata appear to be analogous to Oracle temporary tables, not %ROWTYPE.Here's my Teradata scenario:- Reviewing a procedure to perform complex processing on data as part of an ETL process- It uses a series of CURSORs to fetch and process data, tables have dozens of columns each- as a result, the Teradata code declares hundreds of local variables to FETCH into.Is there a way I can reduce these hundreds of variables into a handful of %ROWTYPE -like declarations?If not %ROWTYPE, can I create my own stuctured datatype to match the cursor's result structure?I'm experience with Oracle PL/SQL but new to Teradata, so I would appreciate an example if applicable.Thanks in advance,Rich

You must sign in to leave a comment.