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
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 |
What is the syntax and use of the coalesce function?
What is bulk collections?
What are different clauses used in sql?
Explain what is a subquery ?
How do I turn a list into a table?
how does a local variable is defined using t-sql? : Transact sql
Is sql a case sensitive language?
Why query optimization is needed?
What does “select count(1) from tab” result?
what is 'mysqlcheck'? : Sql dba
What is a design view?
Explain select statements in sql?