RE: [SQL] convert text to varchar

From: Michael J Davis <michael(dot)j(dot)davis(at)tvguide(dot)com>
To: "'JT Kirkpatrick'" <jt-kirkpatrick(at)mpsllc(dot)com>, "'pgsql-sql(at)hub(dot)org'" <pgsql-sql(at)hub(dot)org>
Subject: RE: [SQL] convert text to varchar
Date: 1999-05-03 15:34:34
Message-ID: 93C04F1F5173D211A27900105AA8FCFC145464@lambic.prevuenet.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

try:
insert into ap (apnote) select apnote::varchar from ap3;

> -----Original Message-----
> From: JT Kirkpatrick [SMTP:jt-kirkpatrick(at)mpsllc(dot)com]
> Sent: Monday, May 03, 1999 9:33 AM
> To: 'pgsql-sql(at)hub(dot)org'
> Subject: [SQL] convert text to varchar
>
> hi! i have a text field (table ap3, field name apnote) that i would like
> to insert into a varchar field (same field name, table name ap). any idea
>
> why this doesn't work? insert into ap (apnote) select varchar('apnote')
> from ap3; -- it fails with or without the single quotes.
>
> TIA, jt

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-05-03 15:47:04 Re: [SQL] Slow Inserts Again
Previous Message Frank Morton 1999-05-03 15:33:53 Re: [SQL] Slow Inserts Again