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
Sum only positive values in ACCESS 2003 table
need to fix warn
Microsoft Vista SystemPropertiesComputerNa<wbr />me at Logon?
t-sql if statement containing two requirements doesn't work
add commas for select query
Word VBA, Loop through all words in a document
Special Values in VBA
Is Foxpro 2.5 y2k compliant?
Locking down a 2003 Terminal Server with a 2008 GPO
installshield error 6267