Home » SQL & PL/SQL » SQL & PL/SQL » SQL*plus command (oracle 10g)
SQL*plus command [message #346828] Tue, 09 September 2008 16:13 Go to next message
ukdas
Messages: 32
Registered: September 2008
Location: London
Member

is there any command for the percentage ??
i have two table and one contains information about the cost and other percentage discounted. so i would like to find the cost of that table by using other discounted table which will be implied to the other and result will be the cost that is discounted of some percentage.

if anyone help me regarding this problem would be much appreciated.
Re: SQL*plus command [message #346829 is a reply to message #346828] Tue, 09 September 2008 16:17 Go to previous messageGo to next message
BlackSwan
Messages: 25038
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Most folks learn how to calculate percentages in middle school.
Remedial GOOGLE training is available upon request.
Re: SQL*plus command [message #346850 is a reply to message #346828] Tue, 09 September 2008 20:56 Go to previous messageGo to next message
ukdas
Messages: 32
Registered: September 2008
Location: London
Member

hi
i need to hear from u guys as i don't know whether any sql command exists to find the percentage of any value. i know there r some functions exists as max, min, count etc.

here my point is that:
i got a table which contains one of the column called cost and other table i hv created with the value of percentage that will be discounted. and i need to use cross join or u can say cartesian join to display the cost discounted by the figure of the new table.

any kind of help will be appreciated.
thanks
Re: SQL*plus command [message #346859 is a reply to message #346850] Tue, 09 September 2008 22:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
PLease read forum guide:
- don't use IM speak
- post a test case
- post what you tried
- format your post (for the 2 previous points)

What is a percentage? How do you calculate it (if you are not in SQL)?

Regards
Michel


Re: SQL*plus command [message #346962 is a reply to message #346859] Wed, 10 September 2008 04:20 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
I've never imagined I would ever link to a kid's maths page as relevant documentation here, but here you go :

Determining Percentage
Re: SQL*plus command [message #347120 is a reply to message #346828] Wed, 10 September 2008 15:55 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
Check out the analytic command RATIO_TO_REPORT()
Previous Topic: Table Name Identification
Next Topic: CHECK constraint not working ?
Goto Forum:
  


Current Time: Mon Dec 05 13:20:15 CST 2016

Total time taken to generate the page: 0.19739 seconds