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
control transparent problem
MS Access application crashes unexpectedly
VB.Net - easy question - isnumeric for rowfilter column?
.pdb file
Clipart is crashing Word, how do I recitfy this?
Pivot Table control in C-Sharp
Print a Access 2007 Pivot Table
Show days excluding weekends
Resource unavailable when calling modeless dialog from regular MFC dll
Internet selectively disconnecting in Vista after 10-15 minutes.