Microsoft
Software
Hardware
Network
Question : Insert multiple rows into one field
I am running this query
SELECT CONVERT(VARCHAR(10),CardOT
BID) + ' ' + CONVERT(VARCHAR(20),Curren
tBalance)
FROM CardOTB_T_EC
WHERE CurrentBalance > @Amount
I want the results to go into one field so I can insert them into one row of a table.
Does anyone know how to do this?
Answer : Insert multiple rows into one field
declare @res varchar(8000)
SELECT @Res = COALESCE(@res+',' , '' )+ CONVERT(VARCHAR(10),CardOT
BID) + ' ' + CONVERT(VARCHAR(20),Curren
tBalance)
FROM CardOTB_T_EC
WHERE CurrentBalance > @Amount
---now you can insert @res into the other table
Random Solutions
moving documents and settings from c to d drive
Windows Phone Dialer not Working Right With XP
Newly promoted DC is unable to enable Replication; Event 13508
Dataset - Column value - need correct syntax
Display Sharepoint documents name in Infopath form?
re: Hosting website with IIS 6
MDBData Logs??
Access 2007 merge form + subform to Word
Dim db1 as database; suddenly "database" becomes user defined type
Access 2003 Drag and Drop