Skip site navigation (1) Skip section navigation (2)

Need some help in dates

From: Stéphane DEWITTE <stephane(dot)dewitte(at)smeso(dot)fr>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Need some help in dates
Date: 2002-04-17 11:58:58
Message-ID: NOEAIPGJHJIHECKNEIBGIEHBCOAA.stephane.dewitte@smeso.fr (view raw or flat)
Thread:
Lists: pgsql-sql
Hi.

First, let me apologize for my poor level in english, I hope you'll
understand me.

I'm new in PL/PgSQL, and I have a little problem.

I have a temporary table (temp) with only varchar. I must do a request that
fill another table (mclis) with temp's data. But on the new tables, I have a
field in date format. When I make a

update mclis
set cli_date = temp.temp1

he doesn't want because of the different formats ('column "cli_date" is of
type 'date' but expression is of type 'character varying').

In temp, my data are like 01/01/2001

I tried also
set cli_date = select case(temp.temp1 as date) but he says:
Cannot cast type 'character' to 'date' or Cannot cast type 'character
varying' to 'date'.

Does anyone has an idea ?


pgsql-sql by date

Next:From: Stéphane DEWITTEDate: 2002-04-17 12:33:05
Subject: Need some help with dates
Previous:From: Fernando CarvalhoDate: 2002-04-17 11:10:22
Subject: My is degraded after two weeks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group