X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3E749D1DA95 for ; Tue, 13 Jan 2004 11:31:36 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 02475-10 for ; Tue, 13 Jan 2004 07:31:07 -0400 (AST) Received: from tsmtp1.mail.isp (smtp.terra.es [213.4.129.129]) by svr1.postgresql.org (Postfix) with ESMTP id A8B70D1DA9C for ; Tue, 13 Jan 2004 07:31:03 -0400 (AST) Received: from pcgabi.cad ([217.127.245.93]) by tsmtp1.mail.isp (terra.es) with ESMTP id HRFE9901.JE0; Tue, 13 Jan 2004 12:22:21 +0100 Subject: Re: Insert into From: Gabriel Dovalo Carril Reply-To: dovalo@terra.es To: azwa@nc.com.my Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-tdVVSoAQm5G19aYLmaw6" Organization: Autonomo Message-Id: <1073988931.1805.14.camel@pcgabi.cad> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Tue, 13 Jan 2004 11:15:31 +0100 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/103 X-Sequence-Number: 16496 --=-tdVVSoAQm5G19aYLmaw6 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable El lun, 12-01-2004 a las 10:12, azwa@nc.com.my escribi=F3: >=20 > Hi, > ..../.... >=20 > My SELECT STATEMENT :=20=20 >=20 > dwnc=3D> 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 : >=20 > 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 --=-tdVVSoAQm5G19aYLmaw6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQBAA8VDyGludoIDrwgRAtieAJ0WsHYT/OceObhCbiV25AD/U6P27gCfUMF/ L5PN2ilYvcyoNSpAMfLq8VM= =kRGA -----END PGP SIGNATURE----- --=-tdVVSoAQm5G19aYLmaw6--