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 |
Is it important to partition hard disk?
how to enter numeric values as hex numbers? : Sql dba
Can we perform dml on view?
What is the fastest way of accessing a row in a table?
how many values can the set function of mysql take? : Sql dba
Does sql require a server?
Why truncate is faster than delete?
explain commit and rollback in mysql : sql dba
The in operator may be used if you know the exact value you want to return for at least one of the columns.
Give the order of sql select?
how to use case expression? : Sql dba
How to create an array in pl/sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)