I have an inline function with an array input (dbo.Invoicenrs_table) like below, how can I extend this function to have a parameter more in the array input (I have extended the user defined table with an extra column) and the extra parameter must also be in the select.
FUNCTION [dbo].[fn_SelectInvoices]
(
@Invoice_Nrs dbo.Invoicenrs_table READONLY
)
RETURNS TABLE
AS
RETURN
(
SELECT
[Invoice_Number] ,
[Total_value]
FROM Invoice WHERE [Invoice_Number] IN ( SELECT * from @Invoice_Nrs)
)