Subject Re: The POSITION
Author m_theologos
--- In Firebird-Architect@yahoogroups.com,
"legrand_legrand_63" <grand.brun.63@...> wrote:
>
> For information STRPOS (rfunc UDF Library) could be a short term
solution.
>
> 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 permits
to
> 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-Architect
tel numbers and zip codes like: 0050-0234-567890

to have a (non-standard) RPOSITION which scans the string from right
to left...

Any comments?

m. th.

> Regards
> PAscal
>