I am using the LINQ DataContext Log property to send the generated SQL to the debug window. (There is a message from Kris Vandermotten about this). This works fine, except that the calculated SQL parameters are some SQL comments, and therefore I cannot execute the query in Management Studio. Here is an example:
SELECT * FROM table WHERE id IN (@p0,@p1,@p2)
-- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [5]
-- @p1: Input Int (Size = 0; Prec = 0; Scale = 0) [1]
-- @p2: Input Int (Size = 0; Prec = 0; Scale = 0) [13189086]
So, is there any tool that converts this text to valid SQL?
source
share