Question: CREATE FUNCTION fnDateRange ( @DateMin varchar ( 5 0 ) = NULL, @DateMax varchar ( 5 0 ) = NULL ) RETURNS TABLE As RETURN
CREATE FUNCTION fnDateRange @DateMin varchar NULL, @DateMax varchar NULL
RETURNS TABLE
As
RETURN
SELECT InvoiceNumber, InvoiceDate, InvoiceTotal, InvoiceTotal CreditTotal PaymentTotal AS Balance
FROM Invoices WHERE InvoiceDate BETWEEN @DateMin AND @DateMax
;
GO Invoke this funtion from within a SELECT statement to return those invoices with InvoiceDate between October and October
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
