Home » SQL & PL/SQL » SQL & PL/SQL » Need help with my code to have expected output. (SQL Plus)
Need help with my code to have expected output. [message #312846] Wed, 09 April 2008 22:19 Go to next message
senaubi_me
Messages: 24
Registered: February 2008
Junior Member
Hello Experts,


Attached is a txt files containing my recent sql code and below is the sample output. I need help on how i can make Total number of records label and its value to be positioned below the Total Amount label and value.

I hope someone can help me. I really appreciate it!

God Bless and Thank you!

P.S Please see the attachment.

A Code SR# Sales ID Cash Amount CPF Amount Cust Name Branch
101 1-12345 1-A111 0 100,000 Allan North
101 1-12346 1-A112 50,000 50,000 Cora South
101 1-12347 1-A113 99,000 0 Brian West

Total # of records 3
Total Amount $149,000 $150,000


A Code SR# Sales ID Cash Amount CPF Amount Cust Name Branch
201 1-12222 1-A155 0 100,000 Allan North
201 1-12223 1-A156 50,000 50,000 Cora South
201 1-12224 1-A157 99,000 0 Brian West
201 1-12225 1-A158 100,000 50,000 Sarah East

Total # of records 4
Total Amount $249,000 $200,000

Grand Total Amount $398,000 $350,000
Grand total # of records 7
  • Attachment: CODE2.txt
    (Size: 6.88KB, Downloaded 189 times)
Re: Need help with my code to have expected output. [message #312859 is a reply to message #312846] Wed, 09 April 2008 23:43 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Did you notice how I formatted your post in your previous thread, which made it readable?
Now you go and do the same with this one.
Re: Need help with my code to have expected output. [message #312979 is a reply to message #312859] Thu, 10 April 2008 04:40 Go to previous messageGo to next message
senaubi_me
Messages: 24
Registered: February 2008
Junior Member
hi,

I cant seem to edit my message in the format you did so I just made another attachment which contains my output which is more readable. Please see the attachment of the output.

I hope someone can help me.

Thanks!
  • Attachment: OUTPUT.txt
    (Size: 1.01KB, Downloaded 157 times)
Re: Need help with my code to have expected output. [message #312995 is a reply to message #312979] Thu, 10 April 2008 05:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why not reposting in formatted way instead of reposting with attachement?

Regards
Michel
Re: Need help with my code to have expected output. [message #313153 is a reply to message #312995] Thu, 10 April 2008 22:12 Go to previous messageGo to next message
senaubi_me
Messages: 24
Registered: February 2008
Junior Member
Hi Frank,

How did you format it to look that way? I do not know how to format it the way you did.

Thanks,
Jen
Re: Need help with my code to have expected output. [message #313154 is a reply to message #312846] Thu, 10 April 2008 22:16 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Are you incapable or unwilling to read & FOLLOW posting guidelines in URL (above) at the top of this forum in GOLD background entitled:

"New users note:
Please read the OraFAQ Forum Guide before posting."

[Updated on: Thu, 10 April 2008 22:18] by Moderator

Report message to a moderator

Re: Need help with my code to have expected output. [message #313263 is a reply to message #312846] Fri, 11 April 2008 04:59 Go to previous messageGo to next message
senaubi_me
Messages: 24
Registered: February 2008
Junior Member
Hi experts,

This the result i am getting. I want to put the total amount under the total # of records. Thank you.

Code	SR#	ID		AMT1		AMt2		
101	1A2	1-2		0.00	       	100.00	        

Total # records					3
Total Amount			0.00		100.00		

150	1A3	1-2		0		100.00	
150	1A4	1-1		10.00		150.00		

Total # records					2
Total Amount			10.00		250.00		
		
Grand Amount			10.00		350.00		
Grand total # records				5
Re: Need help with my code to have expected output. [message #313348 is a reply to message #313263] Fri, 11 April 2008 08:09 Go to previous message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
In SQL*Plus, you'll want to use the BREAK and COMPUTE commands to do this, although you won't get nice headings as such.
Previous Topic: Compiling all Views Using a Job
Next Topic: select only structure of table ,no any rows
Goto Forum:
  


Current Time: Fri Dec 09 14:00:25 CST 2016

Total time taken to generate the page: 0.09401 seconds