I\'m attempting towrite a function to determine if an html5 websql db table is empty.Code is below.I put alerts in there to see what is happening.When this function runs the alert at bottom pops up fi
I\'m using dynamic SQL and I need to exec a long SQL query, First I declare @var with query as nvarchar(4000), but my query is longer than 4000 chars.
How do I use EXEC(@SQL) or EXEC SP_EXECUTESQL(@SQL) with Common Table Expressions? Below does not work.
I have a stored procedure that uses sp_executesql to generate a result set, the number of columns in the result can vary but will be in the form of Col1 Col2 Col3 etc.
For whatever reason, I can\'t seem to get a value out dynamically from SQL. declare @SQL nvarchar(max)
As the title states, I don\'t understand why the sp_executeSQL would generate a completely different execution plan than running the query from Sql Management Studio.
I am developping an ASP2.0 website with a Microsoft SQL server 2005 Database. I need to implement a functionality which allows users to create a select query (nothing too complex) so that the website
I have an OpenQuery (Used in SQL2005 to run a query against a legacy database). I\'m building the string to run so that I\'ll return the last 6 months of data.
I\'m trying to pass a TABLE variable to the sp_executesql procedure: DECLARE @params NVARCHAR(MAX) SET @params = \'@workingData TABLE ( col1 VARCHAR(20),
I have a database where all access is controlled by stored procedures. The DBA would like to avoid giving users direct read/write access to the underlying tables, which I can understand. Hence all upd