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
How do I convert horizontal columns in Excel to Vertical Columns
Refresh Records In MS Access Forms
Outlook Closing Spontaneously
Using SQL for Gridview Paging vs Caching
combine text data in textboxes on form
Access Runtime Error
Outlook VB Code Quit Working
Access VBA Code with Excel Object Save As just started generating the Automation Error - The server threw an exception.
auto log off and close forms if idle problem
Computer Browsing (My Network Places)