Query Needed [message #191973] |
Sat, 09 September 2006 08:17 |
sarfraz_attari
Messages: 123 Registered: July 2005
|
Senior Member |
|
|
Dear All
I have two field Invoice date and Purchase Qty . I want to display the Output in following format
No of Months Qty
0-6 month 10
7- 12 months 30
13-24 months 50
Can anyone help me with the query
Thanks
Sarfraz
|
|
|
Re: Query Needed [message #191975 is a reply to message #191973] |
Sat, 09 September 2006 08:40 |
JSI2001
Messages: 1016 Registered: March 2005 Location: Scotland
|
Senior Member |
|
|
You're kidding right?
How on earth can someone give you an answer with the information you have supplied?
Provide sample data along with what you have already tried.
|
|
|
|
|
Re: Query Needed [message #192222 is a reply to message #192031] |
Mon, 11 September 2006 08:21 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
select decode(inv,'29-sep-04','0-6 month',
'20-jan-06','7-12 months',
'20-aug-06','13-24 months') inv, qty
from table
where qty in (10,30,50)
/
|
|
|