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 |
|
Alaveh
Starting Member
24 Posts |
Posted - 2011-09-29 : 19:02:17
|
| hiwhy my function doesn't works .either function and main sql works alone but doesn't works together .CREATE FUNCTION sad() RETURNS INTASBEGIN RETURN 100;end ;select 1100-sad() |
|
|
tduggan
Starting Member
26 Posts |
Posted - 2011-09-29 : 19:06:12
|
| You are trying to pass in a parameter value, but your function doesn't accept any parameters. |
 |
|
|
Alaveh
Starting Member
24 Posts |
Posted - 2011-09-29 : 19:10:21
|
| sorry ,,,, my mistake ,,, no i don't pass any thing . i edit my first post ,,, now try answer me please . thank you |
 |
|
|
tduggan
Starting Member
26 Posts |
Posted - 2011-09-29 : 19:12:20
|
| You need to specify the function's owner, probably dbo:select 1100-dbo.sad() |
 |
|
|
tduggan
Starting Member
26 Posts |
Posted - 2011-09-29 : 19:12:55
|
| CREATE FUNCTION sad() RETURNS INTASBEGINRETURN 100;end ;GOselect 1100-dbo.sad() |
 |
|
|
Alaveh
Starting Member
24 Posts |
Posted - 2011-09-29 : 19:17:03
|
| thank you tduggan ,,, it works :)i didn't wrote GO after end .thanks again |
 |
|
|
tduggan
Starting Member
26 Posts |
Posted - 2011-09-29 : 19:18:28
|
| You're welcome, glad to help. |
 |
|
|
|
|
|
|
|