We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

ORACLE -- SQL results in "one" CELL ?

finance_teacher
on
Medium Priority
681 Views
Last Modified: 2013-12-18
How can I change the below SQL so it displays as ONE CELL of results, with commas between values like "CHE, HAZ, PAI" instead of three separate cells ?

select substr(test,2,555) Types
from jobs
where min_salary=1 and substr(test,1,1)='^'
--------------------------------------------------------
CREATE TABLE "JOBS"
   ("JOB_ID" VARCHAR2(10),
      "JOB_TITLE" VARCHAR2(35),
      "MIN_SALARY" NUMBER(6,0),
      "MAX_SALARY" NUMBER(6,0),
      "TEST" VARCHAR2(5)
   ) ;
---------------------------------------------------
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('AD_PRES','President, "ceo"',1,40000,'^CHE');
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('AD_VP','Administration Vice President',1,30000,'^HAZ');
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('AD_ASST','Administration Assistant',1,6000,'^PAI');
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('FI_MGR','Finance Manager',1,16000,null);
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('FI_ACCOUNT','Accountant',1,9000,null);
Insert into JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY,TEST) values ('AC_MGR','Accounting Manager',1,16000,null);
Comment
Watch Question

Sr. System Analyst
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
awking00Information Technology Specialist
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.