Single data group should be work for multiple type of conditions [message #488517] |
Sat, 08 January 2011 09:48 |
karunakar_adepu84
Messages: 43 Registered: January 2008
|
Member |
|
|
Dear all,
My issue is...
Actually I have one query which contains two parameters from_Date
and To_date.
if user pass the values for the parameter like 1-dec-2010 to 30-dec-2010 query will works fine and it fetches the values according to the query selected.
but now I am going to add one more parameter, the value is 01-apr-2010 now my query should run for 01-apr-2010 to 30-dec-2010.
Here my question is how should I make this scenario with only one query and at the same time the query should work for to scenarios.
Regards,
karunakar.
|
|
|
|
|
Re: Single data group should be work for multiple type of conditions [message #488574 is a reply to message #488528] |
Sun, 09 January 2011 22:10 |
karunakar_adepu84
Messages: 43 Registered: January 2008
|
Member |
|
|
Hi all,
This report should give the first and second parameter values.
and 3rd and second parameter values also, To get the different data bassed on the parameters....
I wants to display like bellow
1st parmeter to 2nd parmeter 3rd par to 2nd par
1-dec-2010 - 31-dec-2010 1-apr-2010 - 31-dec
--------------------------- -------------------
1000.00 1000000.00
2000.00 3000000.00
I hope you guys are understanding my problem is...
Kindly help me out on this...
Regards,
Karunakarr.
[EDITED by LF: applied [pre] tags]
[Updated on: Mon, 10 January 2011 00:05] by Moderator Report message to a moderator
|
|
|
|
Re: Single data group should be work for multiple type of conditions [message #488745 is a reply to message #488580] |
Mon, 10 January 2011 22:35 |
karunakar_adepu84
Messages: 43 Registered: January 2008
|
Member |
|
|
Hi,
My client requirement is to display
Period trans amt Financial Year Previous Year
Trans Amt Period Trans amt
ex: 01-dec-10 to 01-apr-10 to 01-dec-2009 to
31-dec-10 31-dec-10 31-dec-2009
---------------------------------------------------------------
Can we achieve like above with a single query... Here user will pass the parameters 01-dec-2010 to 31-dec-2010 thats all.
So Now we need to calculate the second and 3rd column values...
Thanks & Regards,
Karunakar.
[EDITED by LF: applied [pre] tags]
[Updated on: Tue, 11 January 2011 00:01] by Moderator Report message to a moderator
|
|
|
Re: Single data group should be work for multiple type of conditions [message #488752 is a reply to message #488745] |
Tue, 11 January 2011 00:07 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If you manage to write such a query that would return the correct result in SQL*Plus, you'll (most probably) be able to use it in Reports as well.
Whether it is possible to produce it or not - no idea. We don't have your tables nor your data. All we know is that you "want" the result after someone provides two dates. I'm puzzled by not knowing how and why would you pass two dates in December 2010 and return values from 2009 and April (why not June or September) 2010.
There's just too many things you kept for yourself so - I'm afraid I can't assist any further.
|
|
|