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

Misc Javascript points

 Nodejs can support multithreading through use of promises _ is the numeric separator for javascript, that means the numbers 10_000, 11.23_0...