pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stéphane DEWITTE <stephane@smeso.fr>
To: pgsql-sql@postgresql.org
Subject: Need some help with dates
Date: Wed, 17 Apr 2002 14:33:05 +0200
Message-ID: <NOEAIPGJHJIHECKNEIBGCEHCCOAA.stephane@smeso.fr> (raw)

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 ?




view thread (7+ messages)  latest in thread

Message-ID: <NOEAIPGJHJIHECKNEIBGCEHCCOAA.stephane@smeso.fr>
Permalink:  ../NOEAIPGJHJIHECKNEIBGCEHCCOAA.stephane@smeso.fr/
Also on:    postgresql.org/message-id/NOEAIPGJHJIHECKNEIBGCEHCCOAA.stephane@smeso.fr

 · 

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: stephane@smeso.fr
  Subject: Re: Need some help with dates
  In-Reply-To: <NOEAIPGJHJIHECKNEIBGCEHCCOAA.stephane@smeso.fr>

* 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