473,466 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

comments need to add in one row

14 New Member
i have one table. table.

application_id comments
------------------------------
1234123412 pancard
1234123412 driving license
1234123412 birth certificate.

0909090909 adharcard
0909090909 ration card

if i select 1234123412 i want the data like this,

pancard,driving license, birth certificate.

how to write the query using stuff .
Sep 12 '13 #1
2 1444
rski
700 Recognized Expert Contributor
Not sure which oracle version you are using but you can
1) use hierarchical query (with connect by prior)
2) use wm_concat function like that
-define view
Expand|Select|Wrap|Line Numbers
  1. create view list_of_values as
  2. select application_id , to_char(wm_concat(comments)) from test  group by application_id
  3.  
-and query this view in the following way
Expand|Select|Wrap|Line Numbers
  1. select * from list_of_values  where application_id=1234123412
  2.  
Or just without the view you can query for specific application_id

Expand|Select|Wrap|Line Numbers
  1. select application_id , to_char(wm_concat(comments)) from test  where application_id=1234123412 group by application_id  
  2.  
Sep 13 '13 #2
santhu1
14 New Member
thanks rski,

the query is working fine
Sep 13 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Sims | last post by:
Hi, I proud myself in having good comments, (/**/, // etc...), all over my scripts as well as a very descriptive section at the beginning of the script. No correct me if i am wrong but php must...
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
1
by: Jonnie | last post by:
I am in the process of building an employee database for use by the management team here. They current have Access 97 (I am working on getting them to upgrade to at least 2000). For the most part I...
3
by: Ray Cassick \(Home\) | last post by:
Has anyone played around with them on VB in the new version yet? I am interested to get some feedback form people that have used this new feature before I install next week. I am using VBXC...
40
by: Edward Elliott | last post by:
At the risk of flogging a dead horse, I'm wondering why Python doesn't have any multiline comments. One can abuse triple-quotes for that purpose, but that's obviously not what it's for and doesn't...
98
by: tjb | last post by:
I often see code like this: /// <summary> /// Removes a node. /// </summary> /// <param name="node">The node to remove.</param> public void RemoveNode(Node node) { <...> }
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
5
by: Joey | last post by:
How do I place comments in aspx pages that are subscribed to master pages? This is going to be necessary as all source code pages must have copyrights/author information etc... When I attempt...
14
by: confusedfusion | last post by:
Not sure how many form submissions that have been lost over the years before I started but the company has a contact form that the required fields when validation fails the error message is going...
3
by: bnashenas1984 | last post by:
Hi everyone I have 2 tables in my MySQL DB Products : +----+--------+ | id | Product| +----+--------+ | 1 | Prdct1 |
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.