Can anybody solved this query [message #194940] |
Tue, 26 September 2006 04:53  |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
Hye There
Can any of you help me with this
Create query that displays the employees last names and indicates the amounts of their annual salaries with asterisks. Each asterisk signifies a thousand dollars. Sort the data in descending order of salary. Label the column EMPLOYEES_AND_THEIR_SALARIES.
vikas
|
|
|
|
|
|
|
Re: Can anybody solved this query [message #339254 is a reply to message #339248] |
Thu, 07 August 2008 02:47   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
FLOOR(SAL/1000) tells you how many 1000 dollars the salary is
The RPAD command simply pads a string with that many '*' characters.
Thus you get a string which has an '*' for each 1000 dollars of salary that the employee gets.
|
|
|
|
Re: Can anybody solved this query [message #339286 is a reply to message #339252] |
Thu, 07 August 2008 03:54   |
anu_poorna
Messages: 3 Registered: August 2008
|
Junior Member |
|
|
Hi Michel,
I didnt post a message to explain the query without trying !
I had tried it, But i cant get the relevant answer.so i had asked to explain the same.
Which shows you that i am lazy !
Regards,
Anu.
|
|
|
Re: Can anybody solved this query [message #339290 is a reply to message #339286] |
Thu, 07 August 2008 04:05  |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | Which shows you that i am lazy !
|
This was a question, note the form and question mark.
But I note you didn't read the documentation otherwise you should not ask your last question.
Regards
Michel
|
|
|