in sql table follw columns r their
vehicle_no|servicetype|date|location|
1234 |1FS |1-JAN|PUNE|
4561 |2FS |5-JAN|PUNE|
1234 |PS |7-JAN|PUNE|
1234 |PS |15-JAN|MUMB|
i want o/p below
vehicleno|1fs|1fsdate|1fslocation|1ps|1PSDATE|1PSLOC|2PS|2PS
DATE|2PSLOCA
e.g
1234|1FS|1JAN|PUNE|1PS|7JAN|PUNE|2PS|15JAN|MUMBAI

PLS help me out to execute using sql query



in sql table follw columns r their vehicle_no|servicetype|date|location| 1234 |1FS |1-..

Answer / mathivanan

select listagg(vehicle_no||'|'||servicetype||'|'||date||'|'||location,'|') within group (order by vehicle_no) from table_name

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is a memo field?

0 Answers  


When we can declare a column as Unique and Not Null both at the same time. What is the use pf Primary Key then?

2 Answers   Accenture, Unisoft Infotech,


what is a control file ? : Sql dba

0 Answers  


What is union?

0 Answers  


What is the sql case statement?

0 Answers  






Why is sql important?

0 Answers  


Can we update views in sql?

0 Answers  


wtite down triggr not any entry on Sunday

2 Answers   NIT,


how can you create an empty table from an existing table? : Sql dba

0 Answers  


What is the Query to print out the individual total number of duplicate row in sql.

5 Answers   TCS,


Explain what is sql*plus?

0 Answers  


How do I create a sql database?

0 Answers  


Categories