Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi
i have 2 table:

t1:
t1_id int
name nvarchar(10)

t2:
t2_id int
t1_id int
Semat nvarchar(50)

then i write following SQL Command

SELECT dbo.T1.t1_id, dbo.CONCAT(dbo.T2.product) AS product
FROM dbo.T1 INNER JOIN
dbo.T2 ON dbo.T1.t1_id = dbo.T2.t1_id
GROUP BY dbo.T1.t1_id


but following error is be shown. why?

Msg 4121, Level 16, State 1, Line 1
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.CONCAT", or the name is ambiguous.


thanks
Posted
Comments
Zoltán Zörgő 22-Jan-15 14:57pm    
any progress?
Sergey Alexandrovich Kryukov 23-Jan-15 12:23pm    
Your last question on automatic translations between C# and VB.NET has been automatically removed, so I'll put my answer here:

Please see my past answer: http://www.codeproject.com/Answers/621867/COde-Line-Interpretatio-of-Csharp-to-VB-NET#answer1.

Note that you get the best quality of translation only with the off-like way, with ILSpy. The quality of output code is very good.

—SA

1 solution

That is pretty much because you are using 2008R2, and this aggregate is available from 2012. See: https://msdn.microsoft.com/en-us/library/hh231515.aspx[^]
Still, you can implement it as CLR enabled extension: https://msdn.microsoft.com/en-us/library/ms131056.aspx[^]. On the other hand there are other methods to echive the same result: https://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900