jgd1234567
Programmer
Hi i have a user defined function (called IsValid) which has one parameter and returns a bit. I need to create a sql statement which returns any rows in a table where the function returns 1 based on the inputted value, ie
SELECT * FROM Groups WHERE dbo.IsValid(GroupID) = 1
But the above does not work. I'm pretty new to user defined functions and do not understand how and where i can use them. I could create the above as a stored procedure if i have to but i still do not understand how this could be achieved.
Appreciate if someone could help.
SELECT * FROM Groups WHERE dbo.IsValid(GroupID) = 1
But the above does not work. I'm pretty new to user defined functions and do not understand how and where i can use them. I could create the above as a stored procedure if i have to but i still do not understand how this could be achieved.
Appreciate if someone could help.