Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Syntax to Insert Many Rows to One

Posted on 2008-10-15
6
207 Views
Last Modified: 2012-05-05
I'm trying to select many rows of data and insert them to on row separated by spaces example:

Table1
Debtor   Invoice
1               10
1               12
1               16
2                 4
5               20

I want to select all invoice numbers for Debtor 1 which are 10,12,16 and Insert them into my Note Table.

Note
Debtor      Note
1                10 12 16

Since I have so many different Debtor's that I'm dealing with I have a cursor set up, but I don't know how to set all of those invoice numbers to 1 Variable?
0
Comment
Question by:N R
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 22726514
Search for an udagg that concatenates your rows
0
 
LVL 11

Author Comment

by:N R
ID: 22731938
udagg?
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 22732237
Used Defined Aggregate... you can create your own aggregate using .net
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 11

Author Comment

by:N R
ID: 22734127
yeah, if I knew .net
0
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 500 total points
ID: 22759277
Ups, there isn't other solution buddy
0
 
LVL 11

Author Closing Comment

by:N R
ID: 31506509
Ok, thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question