SQL command for value comparison

Поиск
Список
Период
Сортировка
От Patricia_Leong@tecsg.com.sg
Тема SQL command for value comparison
Дата
Msg-id C82569D2.0006712C.00@neptune.tecsg.com.sg
обсуждение исходный текст
Ответы Re: SQL command for value comparison
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: Re: Loading optimization
Следующее
От: Tod McQuillin
Дата:
Сообщение: Re: SQL command for value comparison