Subject | AW: [firebird-support] string seperation |
---|---|
Author | Olaf Kluge |
Post date | 2011-05-20T10:47:03Z |
Many many thanks!
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!
[Non-text portions of this message have been removed]
> I receive a string like this " 123x22" or "1x3333"the
>
>
>
> The signs in front of 'x' should I insert into a separate Variable, also
> signs after 'x'no
>
>
>
> How can I separate this in firebird? Substring is not the right, because
> 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!
[Non-text portions of this message have been removed]