Hi, somone an idea how to use as subquery it in a view like
DECLARE @mySerials NVARCHAR(max)
SET @mySerials = ''
SELECT OrderNumber, Customer, City,
SELECT @mySerials = ISNULL(@mySerials ,'') + Serial + ','
WHERE Serial.OrderID = Orders.ID
) AS Serials
The problem seems to be the equal sign near @mySerials =...