From: | "Ewan, Michael" <michael(dot)ewan(at)intel(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com>, Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
Cc: | "pdxpug(at)postgresql(dot)org" <pdxpug(at)postgresql(dot)org> |
Subject: | Re: Syntax Error? |
Date: | 2011-02-03 18:20:44 |
Message-ID: | 66C9C47441840949A66773F8F0D9D6A7013551157E@rrsmsx503.amr.corp.intel.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pdxpug |
-----Original Message-----
From: pdxpug-owner(at)postgresql(dot)org [mailto:pdxpug-owner(at)postgresql(dot)org] On Behalf Of Jeff Davis
Sent: Thursday, February 03, 2011 10:19 AM
To: Rich Shepard
Cc: pdxpug(at)postgresql(dot)org
Subject: Re: [pdxpug] Syntax Error?
On Thu, 2011-02-03 at 10:10 -0800, Rich Shepard wrote:
> jerrittwq=# select * from monitor where location = 'GW-24';
> jerrittwq=# select distinct location from monitor;
> location
> ------------------
> <snip>
> 'OMW-9'
> 'GW-24'
> 'FC-2'
>
Is it possible that the values themselves have the quotation marks?
Maybe try:
select * from monitor where location = '''GW-24''';
Or perhaps there is some kind of whitespace or something.
Regards,
Jeff Davis
-----------------
It does look like the quotes are in the data. Try this to prove it...
SELECT * FROM monitor WHERE location LIKE '%GW-24%';
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Shepard | 2011-02-03 18:25:32 | Re: Syntax Error? |
Previous Message | Jeff Davis | 2011-02-03 18:18:32 | Re: Syntax Error? |