SQL command for value comparison - Mailing list pgsql-general

From Patricia_Leong@tecsg.com.sg
Subject SQL command for value comparison
Date
Msg-id C82569D1.001E8413.00@neptune.tecsg.com.sg
Whole thread Raw
List 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.

Need your advise and thanks a lot in advance.

Regards,
Patricia



pgsql-general by date:

Previous
From: "Kevin T. Manley \(home\)"
Date:
Subject: permissions on user-defined functions
Next
From: "Dan Langille"
Date:
Subject: getting number of rows updated within a procedure