Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Greatest() Inside Decode

Status
Not open for further replies.

thermidor

Programmer
Nov 28, 2001
123
US
Hi All:

I have the following logic in a query:
DECODE(
GREATEST(AA.qty_shipped, BB.qty_shipped),
AA.qty_shipped, AA.month_1st,
BB.qty_shipped, BB.month_2nd))

What is returned when AA.qty_shipped = BB.qty_shipped?

TIA,
Sven
 
Hi,
Probably the first ( AA.Month_1st) but it could also
error out - why not test it and see



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 

Does not error out, It returns first element that matches. [3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
That is like asking what is greater 72 or 72...The answer is 72.

Bill
Oracle DBA/Developer
New York State, USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top