Thread: backslash separated values for a field

backslash separated values for a field

From
"surabhi.ahuja"
Date:
Hi, 
 
i have a field "x" which can be of the form
 
abc\def\123
 
i.e. they are back slash separated fields
 
is there any operator in postgres which can process a query like give me all xs where x is abc
 
is ther any opeartor like contain, so i can form a query of the form:
 
select * from table_name where x contains 'abc';
 
thanks,
regards
 
Surabhi

Re: backslash separated values for a field

From
"Leif B. Kristensen"
Date:
On Friday 10 February 2006 12:54, surabhi.ahuja wrote:

>is ther any opeartor like contain, so i can form a query of the form:
>
>select * from table_name where x contains 'abc';

SELECT * FROM table_name WHERE x LIKE '%abc%';

You should probably avoid using backslash as a separator because of its
special meaning as an escape character. That may bite you in several
ways.
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE