September 19, 2007 at 8:34 pm
Somthing what i want to do
Declare @var varchar(8000)
set @var='select col,col2 from sometable'
DECLARE
scanprofile CURSOR FAST_FORWARD READ_ONLY FOR
@var
OPEN
scanprofile
FETCH
NEXT FROM scanprofile
-------
Is it possible to do.....
September 20, 2007 at 1:52 am
Hi!
You can't assing to @var two values (col and col2).
Try this:
DECLARE @col (-- insert data type)
DECLARE @col2 (--insert data type)
DECLARE scanprofile CURSOR READ_ONLY
FOR
select col,col2 from sometable
OPEN scanprofile
FETCH NEXT FROM scanprofile INTO @col, @col2
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy