substring in SPL
Posted in 2000
Topics: Stored Procedures & SPL
--------------BA28260D0B780FDB0DF3580B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, could anyone tell me why doesn't this work in SPL .... LET i = 1; IF w_a_stay_min[i] <= '9' THEN .... it works perfectly if I replace it with IF w_a_stay_min[1] <= '9' THEN thanks julia --------------BA28260D0B780FDB0DF3580B Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> Hi all, <br>could anyone tell me why doesn't this work in SPL <br>.... <br> LET i = 1; <br> IF w_a_stay_min[<b><font color="#CC0000"><font size=+1>i</font></font></b>] <= '9' THEN <br>.... <br>it works perfectly if I replace it with <br> IF w_a_stay_min[<font color="#CC0000"><font size=+1>1</font></font>] <= '9' THEN <br> <p>thanks <br>julia <br> </html> --------------BA28260D0B780FDB0DF3580B--
"Ousmanov (Julia)" wrote: > > --------------BA28260D0B780FDB0DF3580B > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > > Hi all, > could anyone tell me why doesn't this work in SPL > .... > LET i = 1; > IF w_a_stay_min[i] <= '9' THEN > .... > it works perfectly if I replace it with > IF w_a_stay_min[1] <= '9' THEN Because you cannot subscript a string with a variable in SPL. It was just not designed that way. Art S. Kagel