From: "Frank Miles" <fpm@u.washington.edu>
> 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!?
>
Is "shpname" char() rather than varchar() or text? If so I think = strips
spaces from the end and LIKE doesn't.
Try a LIKE 'IDC16W%' and see if that works, or try padding the match with
spaces. Then, I'd recommend replacing any char() with varchar() - not
noticably slower (IMHO) and a lot less irritating.
- Richard Huxton