Casting help

From: "Mitch Vincent" <mitch(at)venux(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Casting help
Date: 2001-02-12 19:08:09
Message-ID: 008001c09527$235833a0$0200000a@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hhs=# INSERT INTO applicants_test (SELECT app_id ,old_id ,emp_id ,inv_id
,createdate ,updatedon ,todelete ,appstatus ,apptype ,infosent ,empinitials
,firstname ,lastname ,salutation ,fontype1 ,fonnumber1 ,fonext1 ,fontype2
,fonnumber2 ,fonext2 ,fontype3 ,fonnumber3 ,fonext3 ,address1 ,address2
,city ,state ,postal ,country ,homestate ,email ,careerdate ,degree1
,degreedate1 ,gpa1 ,university1 ,degree2 ,degreedate2 ,gpa2 ,university2
,startdate ,currentsalary ,degreecode ,industrycode ,title ,company
,companydiv ,preemploy ,minority as processtype ,inunion ,prodnotes ,sk1
,sk2 ,sk3 ,sk4 ,sic1 ,sic2 ,sic3 ,certificates ,clearance ,languages
,desiredsalary ,minimumsalary ,whyseeking ,followdate ,personalnotes as
technotes ,technotes as personalnotes ,relonote ,follownote ,profile
,relopref1 ,relopref2 ,relo_states ,source ,upinitials FROM applicants);
ERROR: Attribute 'processtype' is of type 'varchar' but expression is of
type 'bool'
You will need to rewrite or cast the expression
hhs=#

And

if I try to cast minority to varchar (or anything else for that matter) I
get

ERROR: Cannot cast type 'bool' to 'varchar'

Is there any way to get the above to work? I have a client down and need
this (or something like this) to straighten out his data tables... Thanks!

-Mitch

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emmanuel Charpentier 2001-02-12 19:09:17 What's up with the news server an news-mailinglist interface ?
Previous Message Nelio Alves Pereira Filho 2001-02-12 18:36:05 System Tables