Link to home
Start Free TrialLog in
Avatar of peanut1010
peanut1010

asked on

Last query I am trying to do

The last query I am trying to accomplish is:

Using the table(employee)

Need it to look like
(employee name) makes (sal) as a (job) for the us

have the column label be Employee Salary and sort records in asending order on job

Avatar of krustDog
krustDog

select employeeName+ " makes "+sal + " as a " + job +" for the us " as "Employee Salary" from employee order by job ASC

this should do it.  You might have to convert the salary to a string, I'm not sure what you variables are though
Avatar of peanut1010

ASKER

what about having the column say Employee Salary

so it would be
Employee Salary
---------------

select employeeName+ " makes "+sal + " as a " + job +" for the us " as "Employee Salary" from employee order by job ASC


the result of the select statment too.

The  'as "Employee Salary"'  makes the column

Employee Salary
--------------
Employee1 makes Sal1 as a Job1 for the us
Employee2 makes Sal2 as a Job2 for the us
Employee3 makes Sal3 as a Job3 for the us
Employee4 makes Sal4 as a Job4 for the us


I dunno what you mean by result, I don't have your table.
Actually I figured it out on my own. That wouldn't work with my oracle 8i.  It actually looks like this

Select employeename || 'makes' || sal || 'as a' || job
|| 'for us' "Employee Salary"
from employee order by job asc

Thanks anyways
peanut1010  asked to have this question closed. If there isn't any objection I will

   PAQ & refund

in 72 hours.

** Mindphaser - Community Support Moderator **
ASKER CERTIFIED SOLUTION
Avatar of Mindphaser
Mindphaser

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial