pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Why doesn't this work
4+ messages / 4 participants
[nested] [flat]

* Why doesn't this work
@ 2013-01-15 11:50  Barbara Woolums <barb.woolums@ymail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Barbara Woolums @ 2013-01-15 11:50 UTC (permalink / raw)
  To: pgsql-sql

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


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Why doesn't this work
@ 2013-01-15 11:55  Bèrto ëd Sèra <berto.d.sera@gmail.com>
  parent: Barbara Woolums <barb.woolums@ymail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Bèrto ëd Sèra @ 2013-01-15 11:55 UTC (permalink / raw)
  To: Barbara Woolums <barb.woolums@ymail.com>; +Cc: pgsql-sql

Hi Barbara,

from what I see in your msg, you have a /cr at the end of the
filename. You should check for weird stuff and trim it away (before
insert triggers do wonders at this).

Cheers
Bèrto

On 15 January 2013 11:50, Barbara Woolums <barb.woolums@ymail.com> 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



-- 
==============================
If Pac-Man had affected us as kids, we'd all be running around in a
darkened room munching pills and listening to repetitive music.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Why doesn't this work
@ 2013-01-15 11:58  Leif Biberg Kristensen <leif@solumslekt.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Leif Biberg Kristensen @ 2013-01-15 11:58 UTC (permalink / raw)
  To: pgsql-sql

 Tirsdag 15. januar 2013 12.50.00 skrev Barbara Woolums :
> 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

It seems like you've got a newline at the end of the first field of the last 
row.

Does it work if you change the query to

SELECT id FROM image WHERE image LIKE '%demo-harvey wallbanger.jpg%'

?

regards, Leif


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Why doesn't this work
@ 2013-01-15 15:04  Rob Sargent <robjsargent@gmail.com>
  parent: Barbara Woolums <barb.woolums@ymail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Rob Sargent @ 2013-01-15 15:04 UTC (permalink / raw)
  To: 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'




-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-01-15 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 11:50 Why doesn't this work Barbara Woolums <barb.woolums@ymail.com>
2013-01-15 11:55 ` Bèrto ëd Sèra <berto.d.sera@gmail.com>
2013-01-15 15:04 ` Rob Sargent <robjsargent@gmail.com>
2013-01-15 11:58 Re: Why doesn't this work Leif Biberg Kristensen <leif@solumslekt.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox