Re: Why doesn't this work

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Why doesn't this work
Date: 2013-01-15 15:04:23
Message-ID: 50F56FF7.9000701@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 01/15/2013 04:50 AM, Barbara Woolums wrote:
> I am running a query like so
>
> SELECT id FROM image WHERE image='demo-harvey wallbanger.jpg'
>
> It returns nothing
>
> My table looks like this
>
> "demo-820.jpg";1
> "demo-lemon-mousse-1.jpg";2
> "demo-pumpkinchaibars.jpg";3
> "demo-Lolly-Shop.jpg";4
> "demo-scan0001.jpg";5
> "demo-cherry-chocolate-mousse-pie.jpg";6
> "demo-harvey wallbanger.jpg
> ";7
>
> Cheers
> Barbara

Try select id from image where image.image ~'demo-harvey wallbanger';

If you example data is correct, I think you have a line-feed char after
'.jpg'

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message kgeographer 2013-01-15 17:08:50 Re: returning values from dynamic SQL to a variable
Previous Message Leif Biberg Kristensen 2013-01-15 11:58:18 Re: Why doesn't this work