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
Modifying Conditional Formatting of Access Text Box on Continuous Form from VBA
Select distinct with binary
Need help diagnosing Sharepoint hang.
reorderlist sort descending
InfoPath 2007: Error on file open, "InfoPath cannot create a new, blank form"
How do I use a user-defined function in Access
Why am I getting this clipboard warning message on IE8?
Excel Zone Expert Discussion, Number 12
Building VPN with DI524 dlink router
Making a bootable Windows XP flash drive