Showing posts with label T-SQL Errors. Show all posts
Showing posts with label T-SQL Errors. Show all posts
StumbleUpon
Share on Facebook

Sunday, May 6, 2012

'int' is not a recognized CURSOR option.



This error occurs when a variable name is preceded by # instead of @. # is used to declare temporary table

declare #myi int

Should be replaced by

declare @myi int

StumbleUpon
Share on Facebook

Tuesday, May 31, 2011

A RETURN statement with a return value cannot be used in this context. - Create Function

If this error occurs in the Create Function that uses a table then the variable after return statement should be removed

The syntax should be like

Create Function
Returns Table
(
Table Definition here
..
..
)
as
BEGIN
..
..
RETURN -- note no value is returned here
END
StumbleUpon
Share on Facebook

Saturday, September 5, 2009

'int' is not a recognized CURSOR option.

This error occurs when a variable name is preceded by # instead of @. # is used to declare temporary table

declare #myi int

Should be replaced by

declare @myi int

Related Posts Plugin for WordPress, Blogger...