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
Wait Till Queries Have Refreshed
Internal Cert Issue
How to remotly monitor Paged Pool and Nonpaged Pool usage by process
replacing/deleting spaces in a string vfp
Access Database Will Not Open - Error "Not a Valid Bookmark"
Script to automatically run the saved imports in an access database
All mailboxes in mailbox store in exchange have disapeared
Default background color for new users
List out All table and indexes in a particular database
binding to a dependency property on a custom control