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
Add/Remove programs display has large gap in listling ?
Locked out of SBS 2008
What workarounds are available to paste an image into a sharepoint list form
Plesk SSL issue in a domain.
psexec - No process is on the other end of the pipe.
How many cores does Microsoft SBS 2003 support?
The "Set Value' Macro action cannot be run in disable mode. in MS Access 2007
Error: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe
ORDER BY in UNION query that contains both text and numbers
Data Grid Control in MFC