Subject | Re: [ib-support] Substring? |
---|---|
Author | Joe Martinez |
Post date | 2001-08-18T07:20:29Z |
So, are you saying that NONE of the three examples that you gave will work for IB 5.6, and that there is no way to do what I want?
You say that they work in FB. Does that include dialect 1?
Thanks,
Joe
You say that they work in FB. Does that include dialect 1?
Thanks,
Joe
> update mytable
> set myfield = substring(myfield from 4)
> where...
>
> update mytable
> set myfield = substr(myfield, 4, 32765)
> where...
>
> update mytable
> set myfield = substrlen(myfield, 4, 32761)
> where...
>
> The bold note is that neither of them work with IB, but with FB:
> - substring is the ANSI SQL function implemented in FB.
> - substr in IB will return NULL if the end position is greater than the
> field's length; FB substr will return from start to end_pos or end of
> string, whatever happens first. It seems more sensible.
> - substrlen is a variation devised for FB. Instead of working as
> (s,begin_pos,end_pos), it works as (s, begin_pos,length).