Re: Insert into

From: Gabriel Dovalo Carril <dovalo(at)terra(dot)es>
To: azwa(at)nc(dot)com(dot)my
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Insert into
Date: 2004-01-13 10:15:31
Message-ID: 1073988931.1805.14.camel@pcgabi.cad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

El lun, 12-01-2004 a las 10:12, azwa(at)nc(dot)com(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message jclaudio 2004-01-13 11:00:01 problem with function trigger
Previous Message BenLaKnet 2004-01-13 09:11:39 Re: Triggers