Cursor select * with Fetch Next statement -
i working on fetch statement inside cursor. need convert sql server script teradata.
following scnerio working in teradata( select columns )
sql server input:---------------------------------------
declare vend_cursor cursor select cnic departments; open vend_cursor fetch next vend_cursor;
teradata output: ---------------------------------
replace procedure #anonymous# () begin declare var#0 varchar(100); declare vend_cursor cursor select cnic departments; open vend_cursor; fetch next vend_cursor var#0; end;
but need convert following script(in select columns replaced select *) sql server input:---------------------------------------
declare vend_cursor cursor select * departments; open vend_cursor fetch next vend_cursor;
teradata output: ---------------------------------
replace procedure #anonymous# () begin declare var#0 varchar(100); declare vend_cursor cursor select cnic departments; open vend_cursor; fetch next vend_cursor var#0; end;
the output needs modified. need run select * statement, fetch next needs modified. 1 possible solution in mind create new type of varray , in fetch statement after into. not working. can 1 please possible conversion?
Comments
Post a Comment