Re: Identifying Reason for Column Name Returned by SELECT - Mailing list pgsql-general

From Steve Crawford
Subject Re: Identifying Reason for Column Name Returned by SELECT
Date
Msg-id 4E70D977.3070303@pinpointresearch.com
Whole thread Raw
In response to Identifying Reason for Column Name Returned by SELECT  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Identifying Reason for Column Name Returned by SELECT  (Richard Broersma <richard.broersma@gmail.com>)
Re: Identifying Reason for Column Name Returned by SELECT  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
I suspect you have a multi-line entry and the '+' is just indicating
that the field continues.

Try ...where site_id ~ 'GW-22'... (this may take a while if the table is
very large).

Cheers,
Steve



On 09/14/2011 09:35 AM, Rich Shepard wrote:
>   I run this SELECT statement on a table:
>
> select distinct(site_id) from chemistry order by site_id;
>
> and in the returned set I see:
>
>  GW-21
>  GW-22
>  GW-22         +
>
>  GW-24
>
>   I want to find that row returning 'GW-22      +' because I believe it
> should be 'GW-23'. However, my attempts to retrieve that row keep
> failing.
> I've tried these statements:
>
> select count(*) from chemistry where site_id = 'GW-22         +';
>  count -------
>      0
> (1 row)
>
> yet,
>
> select count(*) from chemistry where site_id = 'GW-22';
>  count -------
>    803
> (1 row)
>
>   Looking for the blank row also fails when I try to specify site_id
> as is
> null, = ' ', or =''.
>
>   Please point me to the proper way of finding this rogue row so I can
> correct the value in the site_id column.
>
> TIA,
>
> Rich
>


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Identifying Reason for Column Name Returned by SELECT
Next
From: Darren Duncan
Date:
Subject: Re: Identifying Reason for Column Name Returned by SELECT