From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: max (timestamp,timestamp)
Date: Mon, 13 Nov 2006 15:08:28 +0100
Message-ID: <20061113140828.GD14281@a-kretschmer.de> (raw)
In-Reply-To: <45587718.2010009@numerixtechnology.de>
References: <45587718.2010009@numerixtechnology.de>
am Mon, dem 13.11.2006, um 13:46:00 +0000 mailte T E Schmitz folgendes:
> I tried the following query but the query fails as
> "function max (timestamp w. timezone,timestamp w. timezone) does not exist"
>
> SELECT id,
>
> MAX(last_updated,
> (SELECT MAX (last_updated) FROM product_category_member WHERE
> product_category_member.id = product_category.id))
>
> FROM product_category
>
>
> product_category.last_updated and product_category_member.last_updated
> are timestamps with timezone.
Really, there are no such function. Perhaps this can help you:
SELECT id, MAX(product_category.last_updated),
MAX(product_category_member.last_updated) from product_category,
product_category_member WHERE product_category_member.id =
product_category.id;
**untested**
Your fault is that there are no max(timestamp,timestamp) - funktion and
i think, you should read more about JOINs.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
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: andreas.kretschmer@schollglas.com
Subject: Re: max (timestamp,timestamp)
In-Reply-To: <20061113140828.GD14281@a-kretschmer.de>
* 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