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 |
|
darenkov
Yak Posting Veteran
90 Posts |
Posted - 2004-11-16 : 11:01:49
|
| Hi,I am trying to create a basic function with the following syntax:CREATE FUNCTION Addition(@Number1 Decimal(6,2), @Number2 Decimal(6,2))RETURNS Decimal(6,2)BEGIN DECLARE @Result Decimal(6,2) SET @Result = @Number1 + @Number2 RETURN @ResultENDThe problem is that whenever I call it with the code below:PRINT mydatabase.dbo.Addition(1450, 228)I get the following error:Error: Invalid object name 'nobleaccounting.dbo.Addition'I am 100% sure that the database name is correct. Any ideas what else the problem could be? |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-11-16 : 11:14:35
|
try:PRINT (Select mydatabase.dbo.Addition(1450, 228))Corey |
 |
|
|
|
|
|