Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Sqlmm
Starting Member
3 Posts |
Posted - 2011-10-12 : 09:03:45
|
| Helloi have a function, and i want to create a temp table inside my function, but im not returning anything in my function. so i have something likeCREATE FUNCTION dbo.function(String varchar(1000))Returns tableASRETURN( så her i want to put my temp table or is it not possible ?) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-12 : 12:07:01
|
you cant create temp table. you can create table variable though. it should be like:-CREATE FUNCTION dbo.function(String varchar(1000))Returns @tablename table(columns....)ASBEGIN....ENDor CREATE FUNCTION dbo.function(String varchar(1000))Returns tableASRETURN(your select query with full resultset) ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|