-1
select ct.TEST_OPTION_NAME ,
cx.cert_id FROM CERT_TEST_OPTION Ct join 
cert_x_test_option Cx
on ct.test_option_ID = cx.test_option_id;

Current OUtput:

Third Party Exam Center 0014

Online Exam 0014

On Site 0014

National Conference 0014

Looking for output as:

Third Party Exam Center,Online Exam,On Site,National Conference 0014

Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188
Sweta
  • 311
  • 2
  • 3
  • 12
  • Possible duplicate of [How to export query result to csv in Oracle SQL Developer?](http://stackoverflow.com/questions/4168398/how-to-export-query-result-to-csv-in-oracle-sql-developer) – Lukasz Szozda May 02 '16 at 15:31
  • Please post some sample data and desired result – Aleksej May 02 '16 at 16:08
  • This is the output iam currently gettign for that qry i mentioned in the qs: 0014 Online Exam 0014 National Conference 0014 On Site 0014 Third Party Exam Center – Sweta May 02 '16 at 16:15
  • Iam looking for 0014 Online Exam,National Conference,On Site – Sweta May 02 '16 at 16:16
  • That doesn't make much sense. You are selecting two fields, test_option_name and cert_id. You show that long string - which part is the first field returned by the query, and which is the second? Also, in your current output you show four options but in the desired output you only show three; what happened to Third Party Exam Center? Please put a little more effort in stating your problem and your requirement. Show: table ct has the following columns (...) and some of the values are (...) - and make sure you show ROWS of values if the table has more than one column. –  May 02 '16 at 16:42
  • Comments editor formated my text to single line. But my qry result is actually giving 4 rows with name and iD on each row.and Iam looking for a sinlge row with comma separated values.Check below in the answer section – Sweta May 02 '16 at 16:48

1 Answers1

0

I think you are looking to pivot rows into columns. Take a look at this: How to pivot rows into columns (custom pivoting)

Once you have your desired results in columns, you should be able to export as CSV using

select /*csv*/ .....
Community
  • 1
  • 1
msheikh25
  • 576
  • 3
  • 9