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 to Pass (text) criteria to a query using a Multi List Box
minimum xp install
How to read field names from an XSD file.
toolbar on a child window
Can't change working time in project 2007
Opening a report in Access - It asks a question - The answer I type is added as text in the report
NAME? in fields on crosstab query subform
server 2008 security
How can I enable a template item accoding to query result ?
Group Policy File Howto