Translate Powerscript into Oracle PL/SQL Stored Procedure please!
From: P.J.H. Goossens <pjh.goossens_at_quicknet.nl>
Date: Sat, 10 Feb 2001 15:29:38 +0100
Message-ID: <haeh6.12$ua7.2573_at_news.soneraplaza.nl>
string ls_nextchar[6]
Loop
next
Date: Sat, 10 Feb 2001 15:29:38 +0100
Message-ID: <haeh6.12$ua7.2573_at_news.soneraplaza.nl>
The next code is of a function which removes unnecessary trailing zero's
('.0') from a string:
It is written in Powerscript. How to translate this in valid oracle stored
procedure?
Thanks in advance..
Robert
string ls_new, ls_search integer li_Pos, li_tel boolean lb_found
string ls_nextchar[6]
ls_new = as_val ls_nextchar[1] = ')' ls_nextchar[2] = char(32) ls_nextchar[3] = '+' ls_nextchar[4] = '-' ls_nextchar[5] = '/' ls_nextchar[6] = '*'
for li_tel = Lowerbound(ls_nextchar) to upperbound(ls_nextchar)
ls_search = '.0'+ ls_nextchar[li_tel]
li_Pos = pos(ls_new, ls_search, 1)
lb_found = (li_pos > 0)
Do While lb_found
ls_new = left(ls_new,li_pos - 1)+mid(ls_new,li_pos + 2,255) li_Pos = pos(ls_new, ls_search, 1) lb_found = (li_pos > 0)
Loop
next
RETURN (ls_new) Received on Sat Feb 10 2001 - 15:29:38 CET