Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 15: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

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