Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Correspondance of VB Val function
Its called write a function.
create or replace function vb_val(my_val_i in varchar2) is...
Probably using translate and instr you could simultate this. Translate all
non-numerics to 1 known character, find the pisition , take all the
charactes up to that one and then turn the result into a numeric value.
Look in the sql reference manual and the pl/sql reference manual.
Jim
"Oli" <SSI_95270_at_yahoo.fr> wrote in message
news:720ded81.0109260130.5670a0a4_at_posting.google.com...
> Thanks Sybrand,
> Implicit in my question was "How to simulate the VAL function"
> Have you got any idea on that?
>
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
news:<tr1gfllaimdt1e_at_news.demon.nl>...
> > "Oli" <SSI_95270_at_yahoo.fr> wrote in message
> > news:720ded81.0109250542.73c5f1cd_at_posting.google.com...
> > > Hello,
> > > there is a function in VB call VAL allowing
> > > to retrieve only first numeric value of a string.
> > >
> > > E.g.
> > > A=75h87 Val(A)=75
> > > B=985 Val(B)=985
> > > C=9874R Val(C)=9874
> > > D=3Y87U Val(D)=3
> > >
> > > Does this function exist in PL/SQL ?
> > >
> > > Thanks
> >
> > No
> >
> > The sql reference manual would have told you that.
> >
> > Regards,
> >
> > Sybrand Bakker, Senior Oracle DBA
Received on Wed Sep 26 2001 - 07:11:14 CDT