Subject | Re: The POSITION |
---|---|
Author | m_theologos |
Post date | 2006-10-03T07:28:59Z |
--- In Firebird-Architect@yahoogroups.com,
"legrand_legrand_63" <grand.brun.63@...> wrote:
meaning of -1 (ie. the 1st occurence from the right). I think that
isn't so appropiate in spirit of SQL. But if is easier to implement,
so far so good...
HTH,
m. th.
"legrand_legrand_63" <grand.brun.63@...> wrote:
>term
> --- In Firebird-Architect@yahoogroups.com, "m_theologos"
> <theologos@> wrote:
> >
> > --- In Firebird-Architect@yahoogroups.com,
> > "legrand_legrand_63" <grand.brun.63@> wrote:
> > >
> > > For information STRPOS (rfunc UDF Library) could be a short
> > solution.permits
> > >
> > > Regarding SQL standard,
> > > what should be the POSITION behavior when finding more than one
> > result:
> > > - returns the 1rst occurence position ?
> > > - returns 0 (thats the way STRPOS do) ?
> > >
> >
> > - 1st occurence.
> >
> > > Oracle's way is:
> > > INSTR ( string , substring
> > > , position
> > > , occurrence
> > > )
> > > that permits to start the search at a fix position <> 1 and
> > toArchitect
> > > catch the Nth occurence of the substring.
> > >
> >
> > Also I think that its good to have these optional params.
> > Also, is very usefull especially for parsing path strings ie.
> > filepaths like \\Server-A\Share-1\MyFile.txt
> > web addr like http://tech.groups.yahoo.com/group/Firebird-
> > tel numbers and zip codes like: 0050-0234-567890right
> >
> > to have a (non-standard) RPOSITION which scans the string from
> > to left...Also, I thought the same. But I think that isn't so clear what's the
> >
> > Any comments?
> >
> I forgot to tell you:
> in Oracle's INSTR "occurence" can be a negativ integer, permitting
> search from right to left witin the same buit-in function ;o)
>
meaning of -1 (ie. the 1st occurence from the right). I think that
isn't so appropiate in spirit of SQL. But if is easier to implement,
so far so good...
HTH,
m. th.