Re: Insert into - Mailing list pgsql-sql

From Gabriel Dovalo Carril
Subject Re: Insert into
Date
Msg-id 1073988931.1805.14.camel@pcgabi.cad
Whole thread Raw
In response to Insert into  (azwa@nc.com.my)
List pgsql-sql
El lun, 12-01-2004 a las 10:12, azwa@nc.com.my escribió:
>
> Hi,
> ..../....
>
> My SELECT STATEMENT :
>
> dwnc=> insert into cust_lo_dim
> dwnc-> (lo_no,lo_date,rcvdate,lo_status)
> dwnc-> select c.lono,c.lodate,c.rcvdate,c.status
> dwnc-> from custlo_temp c ;
> ERROR:  column "lo_date" is of type date but expression is of type
> text
>         You will need to rewrite or cast the expression
> Questions :
>
>   1)  How to rewrite /cast the expression above ???  same goes to
> others column .


Insert into cust_lo_dim
(lo_no, lo_date, rcvdate, lo_status)
select c.lono, c.lodate::date, c.rcvdate::date, c.status
from custlo_temp c;



> 2) lo_key is the column which values comes from sequence clo_seq. what
> should i do first b4 insert into cust_lo_dim ????

???
Nothing.
Are you getting some error?


--
Gabriel Dovalo

pgsql-sql by date:

Previous
From: BenLaKnet
Date:
Subject: Re: Triggers
Next
From: jclaudio@capitol.fr
Date:
Subject: problem with function trigger