Hi
I have below code &it is giving above error. Functions exists
SQL
,(select count(*) from [dbo].[Fun_GetBookReturnStatus](B.[ID],GP.[StudentID]))Thanks
Hi
I have below code &it is giving above error. Functions exists
,(select count(*) from [dbo].[Fun_GetBookReturnStatus](B.[ID],GP.[StudentID]))Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted May 1, 2023, 1:50 AM EDT
Try to store the fubction value in a variable and then use it.
DECLARE @bookReturnCount INT = (SELECT COUNT(*) FROM [dbo].[Fun_GetBookReturnStatus](B.[ID],GP.[StudentID])Use it like ,ISNULL(@bookReturnCount,'') [BookReturnStatus].
Amit MohantyRank #112 · 20K reputationPosted May 1, 2023, 1:34 AM EDT
One possible reason for the error could be that the user-defined function
Fun_GetBookReturnStatusdoes not exist in the current database or the input parameters provided to the function are invalid or not of the expected data type.Ramco RamcoRank #462 · 5.4K reputationPosted May 1, 2023, 1:40 AM EDT
Hi AMit
Below line is also in the procedure & it is working
,ISNULL([dbo].[Fun_GetBookReturnStatus](B.[ID],GP.[StudentID]),'') [BookReturnStatus].
I want to get count of records returned by Function
Thanks