Subject Re: [firebird-support] string seperation
Author Thomas Steinmaurer
> I receive a string like this " 123x22" or "1x3333"
>
>
>
> The signs in front of 'x' should I insert into a separate Variable, also the
> signs after 'x'
>
>
>
> How can I separate this in firebird? Substring is not the right, because no
> fixed length.

A combination of POSITION and SUBSTRING.

For example:


select
substring('1x3333' from 1 for Position('x', '1x3333') - 1)
, substring('1x3333' from Position('x', '1x3333') + 1)
from
rdb$database



--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!