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

Re: updating table where one date field is null

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: rterry(at)internode(dot)on(dot)net
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: updating table where one date field is null
Date: 2008-07-17 22:34:14
Message-ID: 20080717153208.M84890@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Fri, 18 Jul 2008, richard terry wrote:

> I'm passing some information to postges (from gambas basic), which gets the
> data from date type
>
> eg date1 as date
>      date2 as date
>
> (IN the postgres database the default on the date field is null)
>
> my problem is that postgres baulks when I"ve not put a date into one of the
> gambas date variables with the message:
>
> "invalid syntax for type date '00:00:00'"
>
> my sql is far more complex but reduced to the date part reads something like
> this
>
> insert into mytable (date1, date2) values
>
> ('01/01/2008','00:00:00')

'00:00:00' isn't a date. Are you sure that the second isn't meant to be a
time?

In response to

Responses

pgsql-novice by date

Next:From: richard terryDate: 2008-07-18 00:58:38
Subject: Re: updating table where one date field is null
Previous:From: richard terryDate: 2008-07-17 21:54:11
Subject: updating table where one date field is null

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