473,412 Members | 5,361 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

SELECTing multiple rows to a single output line

Anybody knows a way to produce output from a SELECT statement on a
single line, instead of each hit on a separate line?

Here is what I mean: let's say I have a table listing families, one per
row that includes the name of father, mother and the number of children.
Then there would be another table with one row for each child and the
rows would be linked to the first table with a foreign key scheme.

Now I would like to list each family with joining the two tables, with
the name of children listed on the same line as the parents, with --
say -- a comma separating each child's name.

I can't figure out any way to produce SELECT output serially, on a
single line. Some suggested stored procedures but my past experience
with stored procedures was that they often were "unstored" when the DBA
did some maintenance and it was just not as reliable as using dynamic
SQL statements, in this case with Java.

Thanks for any tips you might have,
Rudy

Aug 14 '05 #1
1 8271


"R. P." <r_********@hotmail.com> wrote in message
news:0v********************@comcast.com...
| Anybody knows a way to produce output from a SELECT statement on a
| single line, instead of each hit on a separate line?
|
| Here is what I mean: let's say I have a table listing families, one per
| row that includes the name of father, mother and the number of children.
| Then there would be another table with one row for each child and the
| rows would be linked to the first table with a foreign key scheme.
|
| Now I would like to list each family with joining the two tables, with
| the name of children listed on the same line as the parents, with --
| say -- a comma separating each child's name.
|
| I can't figure out any way to produce SELECT output serially, on a
| single line. Some suggested stored procedures but my past experience
| with stored procedures was that they often were "unstored" when the DBA
| did some maintenance and it was just not as reliable as using dynamic
| SQL statements, in this case with Java.

http://builder.com.com/5100-6388_14-5259821.html
Aug 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nicolla MacPherson | last post by:
Hi I'm a newbie and want to display a pattern that will increment with each line of display. I thought i might be able to count the rows and use that info to increment my display. I've got my...
1
by: Jay | last post by:
Hi All, My users are complaining about the page refreshing when they are selecting multiple rows in a datagrid. Has anyone tried to manage this using javascript? I tried smartnavigation but that...
1
by: sneha123 | last post by:
There will be some 20 questions and for each question there will be 4 choices.what i want to do is to select multiple answers by clicking the checkbox. i m using asp.net,vb.net pls help me we...
1
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been...
1
by: mark | last post by:
I can't seem to get the logic for printing multiple pages. I know I have to do a comparison between the bottom margin and the position of the next line to be printed and initiate a has more pages...
1
by: Andy | last post by:
Hi Gang I have a simple single table that has many duplicate rows in them. The distinctrows only works on more than one table. Is there a quick and easy way to select only the distict rows...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g. Please help, I'm trying to write an ASP page to use ADO to run a long query against an Oracle 10g database, to create tables,...
1
by: R. P. | last post by:
Anybody knows a way to produce output from a SELECT statement on a single line, instead of each hit on a separate line? Here is what I mean: let's say I have a table listing families, one per...
0
by: bplthebest | last post by:
Hi I have have functionality like Selecting multiple rows (without using check boxes) in Grid view by Ctrl+click (IE) and shift+click(safari and Firefox). And edit the selected rows in a panel...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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...

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.