/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
–Following IS a sample dynamic SQL string –Break your dynamic string LIKE this SET @q1 = ‘SELECT * ‘Â Â SET @q2 = ‘FROM HumanResources.Department ‘ SET @q3 = ‘WHERE DepartmentId=1′ Â –Now EXECUTE them together EXEC (@q1 + @q2 + @q3)
URL: http://blog.namwarrizvi.com/?p=121