MySQL Forums
Forum List  »  Microsoft SQL Server

convert ms sql to my sql
Posted by: Peder Spile
Date: June 22, 2010 05:17AM

dont know much about my sql but why wont this work. ??

DECLARE fetch_status, id ,ordernum INT
set ordernum = 1
DECLARE Prs_Cursor Cursor FOR SELECT id FROM lawyers order by ordernum
Open prs_cursor
FETCH NEXT FROM Prs_Cursor INTO @id
WHILE FETCH_STATUS = 0 do
update lawyers set ordernum = @ordernum
set @ordernum = @ordernum + 1
FETCH NEXT FROM Prs_Cursor INTO @id
end
Close prs_cursor;

Options: ReplyQuote


Subject
Written By
Posted
convert ms sql to my sql
June 22, 2010 05:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.