| From: | Christine Penner <chris(at)fp2(dot)ca> |
|---|---|
| To: | Postgres-General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Find \ in text |
| Date: | 2010-09-07 21:04:08 |
| Message-ID: | 19740413172944.A459334623C222BF@edmwaa03.telusplanet.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)ingenioussoftware(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stefan Wild | 2010-09-07 21:11:18 | Empty SELECT result at simultaneous calls |
| Previous Message | Devrim GÜNDÜZ | 2010-09-07 19:42:00 | Re: On-disk size of db increased after restore |