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