I have a table-valued function and it returns a set of id data. I want to put the function in my query;
SELECT *
FROM caritbl
WHERE cari_id IN (dbo.fn_AtamaliCariListe(37))
Any suggestions?
Edit: I am using SQL Server
In this case you can use this function like a table. Normally you perform your query writing like;
select * from XTable x where x.col in (select y.col from YTable y)
when you use Table-valued functions also you can do it in the same way;
select * from XTable x where x.col in (select y.col from dbo.fn_YourFunction(idparameter) y)
Not that your table-valued function ought to return a result with a column named "col"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With