November 12, 2004 at 1:52 pm
Is their any thing that does the same as Oracle %ROWTYPE that create the record type as the same as the table.
I want to avoid this T-SQL code :
DECLARE @myTable TABLE
( @field1 VARCHAR(10), @field2 VARCHAR(10), ..... )
and have something like Oracle PL/SQL :
DECLARE
TYPE curtype IS REF CURSOR
RETURN myTable%ROWTYPE
-- Then declare a Cursor as same as curtype
....
Any Ideas?
November 14, 2004 at 7:04 pm
Yes, there is, kind of, but I don't know if it will work with a cursor (I avoid cursors) and it uses a temp table (no so bad if proper resources allocated to TempDB) instead of a table variable... here's an oversimplified example...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply