Tuesday, July 5, 2011

SQL Server : You can use @table variables in udf, but not # or ## temp tables

The following code will throw error :

select * into ##tempaaa from LiveData

alter
returns
as
begindeclare @a bigintselect @a = max(id) from ##tempaaa
return @inp
end


The error will be :
Cannot access temporary tables from within a function.
int
function test(@inp int )

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...