CONCAT [message #592250] |
Tue, 06 August 2013 01:56 |
|
satheesh_ss
Messages: 61 Registered: July 2012
|
Member |
|
|
select * from table;
Date | Indicator | Name
---------------|----------------|
01/01/2004| 1 | Mr Smith
01/01/2004| 2 | Mr Brown
02/01/2004| 1 | Mr Jones
02/01/2004| 2 | Mr White
02/01/2004| 3 | Mr Black
SELECT date, GROUP_CONCAT(Name) as namelist
FROM table
GROUP BY date;
Date | namelist
--------------- |--------------|--------------|
01/01/2004 | Mr Smith, Mr Brown |
02/01/2004 | Mr Jones, Mr White, Mr Black|
In Mysql, they joined the names of the employee in a single column using date.
Likewise, i want query in oracle to do the same.
help me if anyone knows....
|
|
|
|
|
Re: CONCAT [message #592254 is a reply to message #592250] |
Tue, 06 August 2013 02:28 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
From your previous topic:
Michel Cadot wrote on Fri, 21 June 2013 10:25from your previous topic:
Michel Cadot wrote on Tue, 28 August 2012 20:491/ Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
...
Michel Cadot wrote on Tue, 21 August 2012 09:59From your previous topic:
Michel Cadot wrote on Thu, 19 July 2012 08:30Michel Cadot wrote on Tue, 17 July 2012 15:04Michel Cadot wrote on Tue, 17 July 2012 11:43Michel Cadot wrote on Tue, 17 July 2012 11:36From your previous topic:
Michel Cadot wrote on Tue, 17 July 2012 11:35From your previous topic:
Michel Cadot wrote on Sat, 14 July 2012 16:11None.
From your previous topics:
Michel Cadot wrote on Thu, 12 July 2012 19:52...
You not only have to read the Concepts manual but also the Database SQL Reference.
Regards
Michel
Michel Cadot wrote on Thu, 12 July 2012 15:11From your previous topic:
Michel Cadot wrote on Thu, 12 July 2012 14:08Please feedback to your previous topics and thanks people that (try to) help you.
Also from your previous topics:
Michel Cadot wrote on Thu, 12 July 2012 08:39All your questions are answered in Database Concepts.
Please read it.
Regards
Michel
Michel Cadot wrote on Thu, 12 July 2012 08:47...
Database Concepts
Regards
Michel
Regards
Michel
In addition, this is a FAQ already posted a hundred time, so SEARCH before posting (accordingly to the guide).
Regards
Michel
What is your problem in writing this?
With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Use SQL*Plus and copy and paste what you already tried.
Regards
Michel
...
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Michel Cadot wrote on Thu, 19 July 2012 10:43PL/SQL User's Guide and Reference
Application Developer's Guide - Fundamentals
...
As you are unable to read and comply simple rules, I'm sure you are anyway unable to read and understand any PL/SQL.
With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
And find a less stupid title to your topic.
Regards
Michel
|
|
|