From: | Frank Miles <fpm(at)u(dot)washington(dot)edu> |
---|---|
To: | Len Morgan <len-morgan(at)crcom(dot)net> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: LIKE erratic? or unseen DB corruption? |
Date: | 2001-05-21 16:46:03 |
Message-ID: | Pine.A41.4.33.0105210941580.15760-100000@mead4.u.washington.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 21 May 2001, Len Morgan wrote:
> Is it possible that there are spaces after the 'IDC16W' in the field? Try:
>
> LIKE 'IDC16W%'
>
> and see if that makes a difference.
>
> len
Indeed it does allow 'LIKE' to find the item -- this item has
the type char(16). Thanks!
-frank
> >A direct query gets appropriate rows of data:
> >
> >dbname=# select * from partdef where shpname = 'IDC16W';
> > pn_id | class | num | mt | ver | loc_id | unit_id | subptcnt |
> shpname | value | descrip
> >-------+-------+------+----+-----+--------+---------+----------+-----------
> -------+------------+---------
> > 17 | 328 | 08X2 | 0 | 0 | | | 1 | IDC16W
> | Header-8x2 |
> > 11 | 323 | 08X2 | 0 | 0 | | | 1 | IDC16W
> | Header-8x2 |
> >
> >...while the very same query (substituting LIKE for the '=' sign) gets
> nothing!?
> >
> >dbname=# select * from partdef where shpname LIKE 'IDC16W';
> > pn_id | class | num | mt | ver | loc_id | unit_id | subptcnt | shpname |
> value | descrip
> >-------+-------+-----+----+-----+--------+---------+----------+---------+--
> -----+---------
> >(0 rows)
> >
From | Date | Subject | |
---|---|---|---|
Next Message | Zak McGregor | 2001-05-21 16:50:10 | Re: Queries across multiple databases (was: SELECT from a table in another database). |
Previous Message | Gregory Wood | 2001-05-21 16:44:50 | Re: LIKE erratic? or unseen DB corruption? |