If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > MS SQL procedure to INFORMIX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-03, 14:05
Kaarde Kaarde is offline
Registered User
 
Join Date: May 2003
Posts: 6
Angry MS SQL procedure to INFORMIX

Hi i'm having trouble translating a stored procedure from ms sql to informix. It's a stored procedure used to deleted from a bunch of tables all related rows. The thing is I've never done stored procedure and i've been scratching my head with this one for a while here are the parts i can not translate

DECLARE crs1 CURSOR FOR
select code from contact
where campaign=@camp_code and code>=@from_code
and code <=@to_code

OPEN crs1
--raiserror ('open cursor error',1,1)

FETCH NEXT FROM crs1 INTO @easycode
if(@easycode=0)
begin
CLOSE crs1
DEALLOCATE crs1
raiserror('ERROR! No contact for deletion',1,1)
return -1
end

WHILE( @@fetch_status <> -1)

This is for the most part the thing i cannot translate, if you can help me on this i'd be more than greatfull. also if you know how i can put it on the server it would be fun

Thanks in advance

Kaarde
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On