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
Access 2003 DB: Too many active users
Select Query
When is it most appropriate to use ADO vs. SQL statements and queries in a multi-user environment?
What is blocking Remote Desktop?
W7 - Give limited users rights to install fonts
How do I disable the login prompt of IIS application
Hooking 5.1 Surround sound to xBox 360 premium
Index fragmentation
Code Behind Value in Hyperlink Field
How to change the location of Listbox using code