Cannot access temporary tables from within a function

by ebarcza 12/29/2009 7:40:00 AM

use a table variable instead. Works like a chahm

So instead of this:

 

create table #TempFees
(
 DealCompPriceID int,
 DealCompID int,
 Tier tinyint,
 FeeName varchar(50),
 FeeType varchar(50),
 Vol int,
 estprice decimal(18,6),
 FeeTypeID int,
 rate decimal(18,6),
 tierActual int,
 ActualPrice decimal(18,6),
 pct decimal(18,6)
)

Use this:

declare @TempFees table
(
 DealCompPriceID int,
 DealCompID int,
 Tier tinyint,
 FeeName varchar(50),
 FeeType varchar(50),
 Vol int,
 estprice decimal(18,6),
 FeeTypeID int,
 rate decimal(18,6),
 tierActual int,
 ActualPrice decimal(18,6),
 pct decimal(18,6)
)

 

 

Tags:

SQL SERVER

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  April 2018  >>
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Sign in