473,383 Members | 1,742 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,383 software developers and data experts.

SQL question / Multiple rows output in one line


How can I do this?

Table A

A B
---------------------
John New York
John Miami
John ...
Max London

I want to do a SELECT which outputs

John, New York Miami ... in one Line

How can I do this?
Can

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 19 '05 #1
1 6067
write a stored function that does a PL/SQL loop to concatenate the values,
call the function within the select column list

SELECT id, name, cities_list(id)
from ...
--
Mark C. Stock
email mcstock -> enquery(dot)com
www.enquery.com
(888) 512-2048

"dirk" <di**@acker.com> wrote in message news:3f********@127.0.0.1...

How can I do this?

Table A

A B
---------------------
John New York
John Miami
John ...
Max London

I want to do a SELECT which outputs

John, New York Miami ... in one Line

How can I do this?
Can

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---
Jul 19 '05 #2

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

Similar topics

1
by: aznFETISH | last post by:
Below I found a code to make multiple colums from the output of a DB, how can I incorporate alternat colors to the multiple row snippet? <?php //set the number of columns $columns = 2; ...
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: 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: michael | last post by:
Hi all, i want to know how to display multiple lines in one crystal report chart in asp.net i wrote some codes but it always display 2 lines in separate chart(please refer to the codes...
12
by: shank | last post by:
I'm trying to use online samples for submitting multiple records from ASP into a stored procedure. Failing! Through the below form, a user could be submitting many records at a time. I'm not...
8
by: julian_m | last post by:
let's say I've an array of articles's id $arr_art_id=(1, 551, 2015, 6 .......n ) what option is better (1 or 2), in order to achieve better performance? (pseudo code) 1) for i=0 to array...
1
by: Sasikala | last post by:
Hi, I have a view which selects these columns: employeenumber,ClientID,Billing code,amountBilled,InvoiceNumber from a number of other tables. One Employee may have many billingAmounts. My view...
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,...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
3
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.