Group Values by date/Pivot in PLSQL query [message #611442] |
Wed, 02 April 2014 10:33 |
|
manishc1989
Messages: 1 Registered: April 2014 Location: India
|
Junior Member |
|
|
Using oracle 10g
I'm working on plsql developer to fetch the daily report for Product_Status.Once the raw data come. I make the pivot from it and group the data by product sales date and type in MS excel. I want to do the same thing in plsql to make some changes in the query itself. Any response would be highly appreciated.
For example :
product.id 1-Apr 2-Apr 3-Apr 4-Apr Grandtotal
A011 89 89 89 89 356
B055 85 85 85 85 340
C055 78 78 78 78 312
D011 98 98 98 98 392
E897 45 45 45 45 180
product sales date format : 3/12/2014 13:14
Below is the query for product details :
Select product.id, initcap(c.FULL_NAME) as Product_Name,Product_Sales_Date,ProductRange
from smspadm.tv_productdetails
where
Product_Sales_Date >= TO_DATE('01-March-2014','DD-MON-YYYY')
and Product_Sales_Date < TO_DATE('18-March-2014','DD-MON-YYYY')
[Updated on: Wed, 02 April 2014 10:37] Report message to a moderator
|
|
|
Re: Group Values by date/Pivot in PLSQL query [message #611443 is a reply to message #611442] |
Wed, 02 April 2014 10:51 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
|
|
|