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
There is a(n) " in the form control's validationrule property
Authentication for OWA in Exchange 2007 fails.
Find Pivot Table's Name
System.OutOfMemoryExceptio<wbr />n when filling dataset with 655,000 rows - need workaround!!
form timer causes "out of stack space error"
Microsoft Vista SystemPropertiesComputerNa<wbr />me at Logon?
Automatic delete of files in delete folder, on exit, in Outlook no longer works?
Exchange 2007/Outlook 2007 Public Folders - Non-local users cannot be given rights on this server?
How to popup a waraning dialog box in asp.net?
QueryTable.Connection error