On Sun, 5 Aug 2001, Allan Engelhardt wrote:
> Francisco Reyes wrote:
>
> > How do I do selects against varchars?
> > A "select * from <table> where <field>=<value>" doesn't seem to work.
> >
> > The same select against a char field works.
>
> What problem are you experiencing?
> test=# create table test (text varchar);
> CREATE
> test=# insert into test values ('foo');
> INSERT 12734264 1
> test=# insert into test values ('bar');
> INSERT 12734265 1
> test=# select * from test where text = 'foo';
> text
> ------
> foo
> (1 row)
>
User error. :-(
The value I was using on the where clause was different from the value on
the field. After your example I took another look and found my typing
error.
thanks.