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 the syntax and use of the coalesce function?

0 Answers  


What is bulk collections?

2 Answers  


What are different clauses used in sql?

0 Answers  


Explain what is a subquery ?

0 Answers  


How do I turn a list into a table?

0 Answers  






how does a local variable is defined using t-sql? : Transact sql

0 Answers  


Is sql a case sensitive language?

0 Answers  


Why query optimization is needed?

0 Answers  


What does “select count(1) from tab” result?

10 Answers   IBM,


what is 'mysqlcheck'? : Sql dba

0 Answers  


What is a design view?

0 Answers  


Explain select statements in sql?

0 Answers  


Categories