Re: DELETE FROM error message

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Darren Ferguson <darren(at)crystalballinc(dot)com>
Cc: Daniel Bakken <dan(at)smtresource(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DELETE FROM error message
Date: 2002-07-18 12:30:12
Message-ID: 1026995412.22899.1.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

DELETE FROM inventory WHERE invid = '01044T'::BPCHAR;

Robert Treat

On Wed, 2002-07-17 at 21:59, Darren Ferguson wrote:
> You will need to cats '01044T' to bpchar since postgres will take any
> string as a varchar unless specified otherwise.
>
> Use the following
>
> DELETE FROM inventory WHERE invid = '01044T'::VARCHAR;
>
> HTH
>
> Darren
>
> On Wed, 17 Jul 2002, Daniel Bakken wrote:
>
> > When running the following DELETE FROM in psql,
> >
> > omni=# DELETE FROM inventory WHERE invid = '01044T';
> > ERROR: Unable to identify an operator '=' for types 'varchar' and 'bpchar'
> > You will have to retype this query using an explicit cast
> >
> > I receive the above error message. The field "invid" is a bpchar.
> >
> > TIA,
> >
> > Daniel Bakken, IT Systems Administrator
> > dan(at)smtresource(dot)com
> >
> > SMT Resource | www.smtresource.com
> >
> > 254.771.3508 phone
> > 254.771.3786 fax
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
>
> --
> Darren Ferguson
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joo Paulo Batistella 2002-07-18 12:37:21 Re: UPPER
Previous Message Johnson, Shaunn 2002-07-18 12:24:25 Re: pg_restore: archiver error