This question already has answers here:
Concatenate results from a SQL query in Oracle
(7 answers)
Closed 6 years ago.
Lets say, I have following table(i.e: Reference Table). I want to display my results as 'Expected Table'. How may I get this result? Any help will be highly appreciated. I am using Oracle 10g.
Expected:
SELECT Collateral_Id,
LISTAGG(Commitment_Id, ',')
WITHIN GROUP (ORDER BY Commitment_Id) "Commitment_Id"
FROM yourTable
GROUP BY Collateral_Id
Related
This question already has answers here:
How to split comma-separated values?
(5 answers)
Split values in parts with sqlite
(2 answers)
Closed 12 months ago.
I have been trying to convert split_string syntax to SQLite from SQL Server. I couldn't find any alternative to do that. can anyone please help me to do that.
SELECT row_number () over (order by (select 0)) rn, value
FROM string_split(Nav_Path,''/'')
This is the SQL query that needs to write in SQLite. There is syntax error saying
Transaction ERROR: sqlite3_prepare_v2 failure: no such table: string_split
Thank you
This question already has answers here:
ListAGG in SQLSERVER
(4 answers)
Simulating group_concat MySQL function in Microsoft SQL Server 2005?
(12 answers)
Closed 6 years ago.
I would like to convert this construction from oracle syntaxis to mssql.
SELECT
cs.id,
LISTAGG(w.WonderNumber, '|')
WITHIN GROUP (
ORDER BY w.WonderNumber) AS Wonder
FROM
CasaS cs
I have tried approaches with FOR XML PATH but didn't completely understand this. Could you please show solution with explanations. Thanks in advance!
This question already has answers here:
How to get Oracle create table statement in SQL*Plus
(3 answers)
Closed 7 years ago.
I'm new to sql and I have created table using create table table_name.
And now I want to get this table definition or let's say source code, I know command desc table_name but that's not what I want. Could you help me figure it out?
Check the function: DBMS_METADATA.GET_DDL
http://psoug.org/reference/dbms_metadata.html
This question already has answers here:
Missing Expression when selecting all columns and one more
(2 answers)
Closed 9 years ago.
When a test with SQL Navigator(it's work fine):
select userid,* from user_ ;
but with sql developer, it get an error: ORA-00936: missing expression
Please explain me why SQL Navigator can but SQL Developer can not, and explain me why what is wrong here.
This question may be similar to sql-Missi.... question, but not true.
Thank for your suggestion !
try this,
select userid, user_.* from user_
SQLFiddle Demo
This question already has answers here:
Closed 12 years ago.
Possible Duplicates:
Is there an Oracle SQL query that aggregates multiple rows into one row?
Agregate rows in Oracle SQL statement
I am working with Oracle 10g. I want to have a comma separated String from a column in a table.
e.g.
Table : Customer
Columns: id and name
Data:
id-------name
1-------John
2-------Galt
3-------Howard
4-------Roark
Output of query should be Jon,Galt,Howard,Roark
Ok, got it, all I wanted was this:
SELECT WM_CONCAT(NAME) FROM CUSTOMER;
Marking all comments as +1. Thanks guys.