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 |
|
hong_ma
Starting Member
37 Posts |
Posted - 2006-04-04 : 11:36:25
|
| is it possible to call a user defined function from the stored procedure in MS SQL 2000? . if possible, how? thanks. |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-04 : 11:40:35
|
| "is it possible to call a user defined function from the stored procedure"Yes"if possible, how"Depends on what the UDF does - is it Scalar, or return a Table or something else?Kristen |
 |
|
|
hong_ma
Starting Member
37 Posts |
Posted - 2006-04-04 : 11:42:17
|
| Thanks, it is Scalar function |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-04 : 11:51:25
|
| Then you just need something like:SELECT @MyVar = dbo.MyFunction(MyParameterValue)don't you?Kristen |
 |
|
|
hong_ma
Starting Member
37 Posts |
Posted - 2006-04-04 : 11:53:27
|
| Kristen, Thanks, I got it. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-05 : 02:39:41
|
| You can also useSELECT dbo.MyFunction(col) as yourcol, othercolumns from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|