Home » SQL & PL/SQL » SQL & PL/SQL » Format SQL-output (merged)
Format SQL-output (merged) [message #208668] Mon, 11 December 2006 19:54 Go to next message
anbazsg
Messages: 8
Registered: December 2006
Junior Member
Hi all,

i want to format my data for pressentation ,

i attached a txt file , that contains the data and output format also.

please view the txt file and give me a solution .

even my output need the sub total and grand total and column grouping also.


thanks & regards,
anbaz.
  • Attachment: sample.txt
    (Size: 1.47KB, Downloaded 148 times)

[Updated on: Mon, 11 December 2006 20:21]

Report message to a moderator

pls help me for the SQL select statement [message #208740 is a reply to message #208668] Tue, 12 December 2006 00:48 Go to previous messageGo to next message
anbazsg
Messages: 8
Registered: December 2006
Junior Member
Hi all,

i want to format my reocrds using column grouping
then i need to apply sub total and grand total with rollup logic,

for ur ref. i attached my acutal reocords and final output format need to produce , so pls go through the txt file and give me a solution for me.

Thanks & regards,
anbaz.



  • Attachment: data.txt
    (Size: 1.61KB, Downloaded 133 times)
Re: pls help me for the SQL select statement [message #209022 is a reply to message #208740] Tue, 12 December 2006 23:55 Go to previous messageGo to next message
janacallsu
Messages: 6
Registered: December 2006
Junior Member
Please attach the code with which you are trying with. I will make the necessary changes and send you the right one.


->Jana
Re: Select statement with rollup [message #209043 is a reply to message #208668] Wed, 13 December 2006 01:04 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Attachment content
Actual data like the below one
-----------------------------------------------------------
proc_num   Family  Error_type   PartNum   Error_msg
-----------------------------------------------------------
1          9AX752  ERROR3      3PN01HPX   invalid number 

1          9AX752  ERROR3      3PN02Vb7   invalid HdaNum

1          9AX752  ERROR3      3WN01HgX   invalid Bupmap

1          9BD148  ERROR7      3QD0014V   HDA notfound  

1          9BD148  ERROR7      3QV0044D   Resacn again

1          9XV952  ERROR9      3QD0014V   invalid bupnum

1          9XV952  ERROR9      3QV0044D   inalid serialnum




but i want to display the data like the below format


-----------------------------------------------------------
proc_num  Family  Error_type  PartNum  Error_msg
-----------------------------------------------------------

1        9AX752   ERROR3   3PN01HPX     invalid number 
                           3PN02Vb7	invalid HdaNum
                           3WN01HgX	invalid Bupmap
                          -----------
                 SubTotal   3



1        9BD148   ERROR7   3QD0014V     HDA notfound 
                           3QV0044D     Resacn again
                         -----------
                Sub Total   2


1        9XV952   ERROR9   3QD0014V    invalid bupnum
                           3QV0044D    inalid serialnum 
                         -------------
                Sub Total   2

 
                Grand Total 7 



MHE

[Updated on: Wed, 13 December 2006 01:05]

Report message to a moderator

Previous Topic: How does one use SQL*Loader to load images
Next Topic: How to find dependecies on a constraint
Goto Forum:
  


Current Time: Sat Dec 03 11:47:49 CST 2016

Total time taken to generate the page: 0.10505 seconds