Home » Developer & Programmer » Reports & Discoverer » query for report (oracle reports 10g)
query for report [message #595216] Mon, 09 September 2013 08:05 Go to next message
furqan
Messages: 110
Registered: January 2012
Location: Hyderabad
Senior Member
hello sirs

i have a table named actual_qty,

in that table i have data store in the following columns:

MaterialCode Location Qty
------------ -------- ---
1111 vizag 2
2222 vizag 1
3333 vizag 4
1111 hyd 4
2222 hyd 6
3333 hyd 2
1111 sec 9
2222 sec 1
3333 sec 0

i want query to display data data in the following form

MaterialCode vizag hyd sec
------------ ----- --- ---
1111 2 4 9
2222 1 6 1
3333 4 2 0

thanks
Re: query for report [message #595218 is a reply to message #595216] Mon, 09 September 2013 08:10 Go to previous messageGo to next message
Lalit Kumar B
Messages: 1087
Registered: May 2013
Location: Hi-tech city
Senior Member
Firstly, please you code tags, else it is very difficult to understand what you mean. And where are you creating your report? Do you need a SQL to get the desired output? If yes, go through PIVOT

[Updated on: Mon, 09 September 2013 08:17]

Report message to a moderator

Re: query for report [message #595220 is a reply to message #595218] Mon, 09 September 2013 08:15 Go to previous messageGo to next message
furqan
Messages: 110
Registered: January 2012
Location: Hyderabad
Senior Member
i have a table named actual_qty,

in that table i have data store in this columns:
MaterialCode             Location     Qty
------------             --------     --- 
1111                      vizag        2
2222          		  vizag        1
3333        		  vizag        4
1111        		  hyd          4
2222         		  hyd          6
3333         		  hyd          2
1111         		  sec          9
2222          		  sec          1
3333         		 sec          0

i want query to display data data in the following form
MaterialCode    vizag   hyd    sec    
------------   ------   -----  ------     
1111              2      4     9
2222              1      6     1
3333           	  4      2     0


need a query for desired output.

[Updated on: Mon, 09 September 2013 08:20]

Report message to a moderator

Re: query for report [message #595221 is a reply to message #595220] Mon, 09 September 2013 08:20 Go to previous messageGo to next message
Lalit Kumar B
Messages: 1087
Registered: May 2013
Location: Hi-tech city
Senior Member
While using code tags, you need to keep the later tag as [/code] and not [code/]

I have provided a link about PIVOT function, go through the examples and come back with what you tried.


[EDIT : Ok, good that you updated with proper code tags, now it's far better. Thanks]

[Updated on: Mon, 09 September 2013 08:22]

Report message to a moderator

Re: query for report [message #595224 is a reply to message #595221] Mon, 09 September 2013 08:30 Go to previous messageGo to next message
furqan
Messages: 110
Registered: January 2012
Location: Hyderabad
Senior Member
i will check ,try and come back.
just need to display data as it is...no need to for sum.

thanks
Re: query for report [message #595225 is a reply to message #595224] Mon, 09 September 2013 08:32 Go to previous message
Lalit Kumar B
Messages: 1087
Registered: May 2013
Location: Hi-tech city
Senior Member
furqan wrote on Mon, 09 September 2013 19:00

just need to display data as it is...no need to for sum.


Then do not use SUM, simple. Just pivot the way you want.
Previous Topic: Want to Calculation based on Summary item
Next Topic: CLOB truncated in report
Goto Forum:
  


Current Time: Sat Apr 19 19:09:10 CDT 2014

Total time taken to generate the page: 0.08187 seconds