Re: Re: INSERT INTO problem

From: Tom Jenkins <tjenkins(at)devis(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: INSERT INTO problem
Date: 2001-02-20 20:14:09
Message-ID: 3A92D011.10602@devis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Heh, I originally had that in the message then deleted it as possible noise.

My original insert had
1 as isdepartment

I then migrated to
1::int2 as isdepartment

and finally to the version I had posted. All returned the same error,
unfortunately.

Alfonso Peniche wrote:

> Did you try removing the quotes from '1'::int2 as isdepartment
> so that it looks:
>
> insert into reportentity
> select 'D0'||text(departmentid) as reportentityid,
> departmentname as reportentityname,
> 1 as isdepartment,
> departmentdescription as reportentitydescription,
> departmentsummary as reportentitysummary
> from department where isreportentity > 0;
>
>
> Tom Jenkins wrote:
>
>> Hello all,
>> I'm trying to do an INSERT INTO using a UNION of two selects. I
>> received an error:
>> "ERROR: Unable to convert varchar to int2 for column isdepartment"
>>
>>

Tom Jenkins
devIS - Development Infostructure
http://www.devis.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Len Morgan 2001-02-20 20:19:05 Re: Printing PostgreSQL reports
Previous Message Alfonso Peniche 2001-02-20 20:07:48 Re: INSERT INTO problem