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 |
Marioi
Posting Yak Master
132 Posts |
Posted - 2005-12-02 : 09:30:27
|
A colleague is working in Visual Studio 2005 (ASP.net) and trying to run a user defined function in SQL Server 2000. Is that possible and how? He is running sProcs without problem.TIA. |
|
jhermiz
3564 Posts |
Posted - 2005-12-02 : 09:54:26
|
Well a sproc can call a udf right? So why dont you call a sproc that calls a udf ???? Keeping the web experience alive -- [url]http://www.web-impulse.com[/url] |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2005-12-02 : 09:59:26
|
A UDF is an *expression* that returns a value (or a table of values), not a an executable command or statement. You need to execute a SQL statement that calls the UDF.i.e.,SELECT dbo.SomeFunction() <-- for a scalar UDForSELECT * from dbo.SomeFunction() <-- for a UDF that returns a table |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-03 : 02:16:34
|
AlsoSELECT dbo.SomeFunction(col),otherCols from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
Marioi
Posting Yak Master
132 Posts |
Posted - 2005-12-05 : 17:10:12
|
quote: Originally posted by jsmith8858 A UDF is an *expression* that returns a value (or a table of values), not a an executable command or statement. You need to execute a SQL statement that calls the UDF.
Thank you. That did it! |
 |
|
|
|
|