Find \ in text - Mailing list pgsql-general

From Christine Penner
Subject Find \ in text
Date
Msg-id 19740413172944.A459334623C222BF@edmwaa03.telusplanet.net
Whole thread Raw
Responses Re: Find \ in text  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Find \ in text  (Steve Crawford <scrawford@pinpointresearch.com>)
Re: Find \ in text  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
I have a character field in a table that contains either a file name
or a full path and file name. I need to pick out the ones that have
no full path. I do this by looking for no \. This is what I am doing:

select MM_PATH_FILE from MULTI_MEDIA Where MM_PATH_FILE NOT ILIKE '%\\%'
         -this gives me all records no matter what has a \ or not

select MM_PATH_FILE from MULTI_MEDIA Where MM_PATH_FILE NOT ILIKE '%\%'
         -this gives me nothing again no matter  what has a \ or not

I even tried this
select MM_PATH_FILE from MULTI_MEDIA Where position('\' in MM_PATH_FILE)=0
         -this gives me an error

Any other suggestions?

Christine Penner
Ingenious Software
250-352-9495
christine@ingenioussoftware.com


pgsql-general by date:

Previous
From: Stefan Wild
Date:
Subject: Empty SELECT result at simultaneous calls
Next
From: Adrian Klaver
Date:
Subject: Re: Find \ in text