dbTalk Databases Forums  

HELP with code and results display

comp.databases.oracle.server comp.databases.oracle.server


Discuss HELP with code and results display in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mj
 
Posts: n/a

Default HELP with code and results display - 04-15-2011 , 02:14 PM






here's test code and results from same.

SELECT distinct
(SELECT count(*) FROM TABLE1)*100/(SELECT count(*) FROM TABLE2)
percent
FROM TABLE1, TABLE2

Results = 46.571428571428571428571428571428571429

I'm trying to get a percentage as result, displayed as "46.57%" but
can't figure out how to trip decimals and display the percent sign.

Any help would be much appreciated.

Thanks

Reply With Quote
  #2  
Old   
Luuk
 
Posts: n/a

Default Re: HELP with code and results display - 04-15-2011 , 02:29 PM






On 15-04-2011 21:14, mj wrote:
Quote:
can't figure out how to trip decimals
http://lmgtfy.com/?q=oracle+round

--
Luuk

Reply With Quote
  #3  
Old   
Luuk
 
Posts: n/a

Default Re: HELP with code and results display - 04-15-2011 , 02:30 PM



On 15-04-2011 21:14, mj wrote:
Quote:
display the percent sign.
http://lmgtfy.com/?q=concatenate+oracle

--
Luuk

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.