how to create and call scalar function in sql server 2008

前端 未结 3 740
小蘑菇
小蘑菇 2020-12-24 11:48

I have created a Scalar Functions, it was created successfully, but when I call the function using select statement, it says invalid object, I altered the function, I got th

相关标签:
3条回答
  • 2020-12-24 12:24

    Your Call works if it were a Table Valued Function. Since its a scalar function, you need to call it like:

    SELECT dbo.fn_HomePageSlider(9, 3025) AS MyResult
    
    0 讨论(0)
  • 2020-12-24 12:29

    Or you can simply use PRINT command instead of SELECT command. Try this,

    PRINT dbo.fn_HomePageSlider(9, 3025)
    
    0 讨论(0)
  • 2020-12-24 12:49

    Try

    SELECT dbo.function (parameters)
    
    0 讨论(0)
提交回复
热议问题