SQL command for value comparison

From: Patricia_Leong(at)tecsg(dot)com(dot)sg
To: pgsql-general(at)postgresql(dot)org
Subject: SQL command for value comparison
Date: 2001-01-12 00:19:05
Message-ID: C82569D2.0006712C.00@neptune.tecsg.com.sg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I would like to compare 2 attributes before display the result using SQL command

e.g new_due_date old_due_date result to display
-----------------------------------------------------------
11 Feb 2001 15 Feb 2001 in
12 Feb 2001 08 Feb 2001 out

"select decode((new_due_date<old_due_date),'in','out') from XYZ" will not be
working as decode only compare exact value.

Please help and thanks in advance.

Regards,
Patricia

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-12 00:19:58 Re: PostgreSQL v7.1BETA3 Bundled and Available ...
Previous Message Tom Lane 2001-01-12 00:13:45 Re: initdb on build machine and moving to production machine