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 |
|
desikankannan
Posting Yak Master
152 Posts |
Posted - 2010-02-13 : 11:04:15
|
| Hii have created a user defined function CREATE FUNCTION SalesByStore (@fldgaugekey bigint)RETURNS TABLE ASRETURN (SELECT fldgoupper, fldcerfno FROM stdguagedetail WHERE fldguagekey = @fldguagekey)but it shows error messageMsg 137, Level 15, State 2, Procedure SalesByStore, Line 5Must declare the scalar variable "@fldguagekey".Desikankannan |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-13 : 11:08:15
|
quote: Originally posted by desikankannan Hii have created a user defined function CREATE FUNCTION SalesByStore (@fldgaugekey bigint)RETURNS TABLE ASRETURN (SELECT fldgoupper, fldcerfno FROM stdguagedetail WHERE fldguagekey = @fldguagekey)but it shows error messageMsg 137, Level 15, State 2, Procedure SalesByStore, Line 5Must declare the scalar variable "@fldguagekey".Desikankannan
its a simple typo you've @fldgaugekey in definition and inside body you've it as @fldguagekey. it should be @fldgauagekey------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
desikankannan
Posting Yak Master
152 Posts |
Posted - 2010-02-13 : 11:15:02
|
| yes its work thanks a lotDesikankannan |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-13 : 11:26:53
|
welcome ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|