I have a function I need to use, I’m passing in a var char and I insert records into a table called using @ValueList. However I’m not sure how to call / use this function ?
ALTER FUNCTION [dbo].[GetListFromCSVString]
(
@csvString varchar(500)
)
RETURNS @ValueList TABLE
(
ListValue varchar(50)
)
AS
begin
-- body
End
Result:
If the parameter to your function is a field in another table you have to use
cross applyget the list of values for each row in the source table.Result: