Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> FOR Next Loop
I am tring to creat a for next loop. I am not
sure what I am doing wrong.
What I want to do is to strip out all non numbers from a field. I thought that I would create a For Next loop to accomplish this. this is what I have:
LENGTH(STF_STAFF.STF_HOME_PHONE) AS PHONELEN,
<<PHONELOOP>>
FOR X = 1 IN PHONELEN LOOP
TESTSTR = INSTR(STF_STAFF.STF_HOME_PHONE,,X,1)
TESTANSI = ASCII(TESTSTR)
IF TESTANSI < 48 THEN
ELSE
AA = AA + TESTANSI
END IF
IF TESTANSI > 57 THEN
ELSE
AA = AA + TESTANSI
END IF
END LOOP PHONELOOP
Any help would be greatly appreciated.
Rodger
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Aug 27 1999 - 14:27:30 CDT
![]() |
![]() |