From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: JT Kirkpatrick <jt-kirkpatrick@mpsllc.com>
To: 'pgsql-sql@hub.org' <pgsql-sql@hub.org>
Subject: Re: [SQL] convert text to varchar
Date: Mon, 3 May 1999 19:02:15 +0300
Message-ID: <l03130308b3537874e3d1@[147.233.159.109]> (raw)
In-Reply-To: <01BE9558.BC2A44E0.jt-kirkpatrick@mpsllc.com>
At 18:33 +0300 on 03/05/1999, JT Kirkpatrick wrote:
> 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.
Should be simply
INSERT INTO ap (apnote)
SELECT ap3.apnote
FROM ap3;
You really shouldn't have single quotes, and the conversion to text is
supposed to be automatic.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: herouth@oumail.openu.ac.il, jt-kirkpatrick@mpsllc.com, pgsql-sql@hub.org
Subject: Re: [SQL] convert text to varchar
In-Reply-To: <l03130308b3537874e3d1@[147.233.159.109]>
References: <01BE9558.BC2A44E0.jt-kirkpatrick@mpsllc.com> <l03130308b3537874e3d1@[147.233.159.109]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox