pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gabriel Dovalo Carril <dovalo@terra.es>
To: azwa@nc.com.my
Cc: pgsql-sql@postgresql.org
Subject: Re: Insert into
Date: Tue, 13 Jan 2004 11:15:31 +0100
Message-ID: <1073988931.1805.14.camel@pcgabi.cad> (raw)
In-Reply-To: <OF1A293121.E2FF931B-ONFFFFFF47.004D9A11@nc.com.my>
References: <OF1A293121.E2FF931B-ONFFFFFF47.004D9A11@nc.com.my>

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

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (13+ messages)  latest in thread

Message-ID: <1073988931.1805.14.camel@pcgabi.cad>
Permalink:  ../1073988931.1805.14.camel@pcgabi.cad/
Also on:    postgresql.org/message-id/1073988931.1805.14.camel@pcgabi.cad

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dovalo@terra.es, azwa@nc.com.my
  Subject: Re: Insert into
  In-Reply-To: <1073988931.1805.14.camel@pcgabi.cad>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox