MS SQL 2005. T-SQL.
I find many good solutions how split string. But how combine result from inner SELECT as string (for example, with comma-separator)? Code:
SELECT b.date,
(SELECT o.number FROM order o WHERE o.number = m.number ) AS orderList
FROM bank b, movemoney m
WHERE b.code = m.code
The table 'movemoney' consist of zero or few orders from the table 'order'. How create 'orderList' as string in one SELECT statement?