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 > DB2 > for statement in store procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-03, 03:07
muiee80 muiee80 is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
for statement in store procedure

i had create a store procedure in informix.
in my store procedure, i had use for loop to perform checking on character by character in one text

below is my coding : -

FOR i IN (1 TO cn_length)
IF p_docno[i] NOT MATCHES "[0123456789]" THEN
LET cn_ind = "0";
END IF
END FOR;

this command just look fine, but when i run this sql stmt, there are syntax error occur, thios error point to [i], after i try on many testing, i found that it cannot understand the [i], if i put 1 or 2 instand of i, no syntax error occur.

i don know whether the subscript part [i] is wrong or maybe the for loop is define wrongly. can you please help me on this matter.

thanks
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