• 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