Home » SQL & PL/SQL » SQL & PL/SQL » Oracle Convert number to asterisk
Oracle Convert number to asterisk [message #413950] Sun, 19 July 2009 11:31 Go to next message
Messages: 1
Registered: July 2009
Location: Philippines
Junior Member
Hi to all..

I've got a small problem, i can't find a way how to convert a given value to number of asterisk (*).

i have a number 5, then i want the output to be in five asterisk (*****)

here's what I've done so far, we need to get the total number of working years of the employee and print the output in asterisk.

select last_name, ((SYSDATE-HIRE_DATE)/360) AS "Total Number of Work in years" from employees;

last_name------------------Total Number of Work in years----Asterisk

can you help me how to convert the answer from ((SYSDATE-HIRE_DATE)/360), in asterisk? thanks
Re: Oracle Convert number to asterisk [message #413951 is a reply to message #413950] Sun, 19 July 2009 11:54 Go to previous messageGo to next message
Michel Cadot
Messages: 63912
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator


[Updated on: Sun, 19 July 2009 11:54]

Report message to a moderator

Re: Oracle Convert number to asterisk [message #413954 is a reply to message #413950] Sun, 19 July 2009 12:55 Go to previous message
Messages: 2818
Registered: May 2007
Location: Scotland
Senior Member
You might also want to look at MONTHS_BETWEEN for a more accurate method of calculating years between two dates.
Previous Topic: NO DATA FOUND error
Goto Forum:

Current Time: Mon Oct 24 00:45:59 CDT 2016

Total time taken to generate the page: 0.05436 seconds