Subject | SIMILAR TO |
---|---|
Author | Bert_Herngreen |
Post date | 2010-10-01T11:58:53Z |
Hi,
It's probably because it's friday afternoon, but I don't see what I'm doing wrong.
I want to check if a field/value contains a certain value devided by a dot (´.´). How do I have to threat the dot, do I have to escape it?
-- Returns null:
select 1 from rdb$database where ('3.4' similar to '[:DIGIT:]+.[:DIGIT:]+')
-- Returns error, 'Invalid ESCAPE sequence':
select 1 from rdb$database where '3.4' similar to '[:DIGIT:]+\.[:DIGIT:]+' ESCAPE '\'
Bert
It's probably because it's friday afternoon, but I don't see what I'm doing wrong.
I want to check if a field/value contains a certain value devided by a dot (´.´). How do I have to threat the dot, do I have to escape it?
-- Returns null:
select 1 from rdb$database where ('3.4' similar to '[:DIGIT:]+.[:DIGIT:]+')
-- Returns error, 'Invalid ESCAPE sequence':
select 1 from rdb$database where '3.4' similar to '[:DIGIT:]+\.[:DIGIT:]+' ESCAPE '\'
Bert