backslash separated values for a field

Started by surabhi.ahujaabout 20 years ago2 messagesgeneral
Jump to latest
#1surabhi.ahuja
surabhi.ahuja@iiitb.ac.in

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

#2Leif B. Kristensen
leif@solumslekt.org
In reply to: surabhi.ahuja (#1)
Re: backslash separated values for a field

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