Query

Hi

Inputs will be Date From & Date To . Party Name
I have 3 tables Sales Order ,Sales Lines & Item . I want to create a query to display party wise sale . Fields will be Sale Order No , date , party , item , qty , amount .

Thanks

SELECT [Sale Order No] , [date] , [party] , [item] , [qty] , [amount]
FROM   [your table name]
WHERE [date] >= @DateFrom
AND   [date] <= @DateTo 
AND   [Party Name] = @PartyName

@jsshivalik Beware if your [date] column is actually Date Time, if so you need to do the equivalent of:

WHERE [date] >= @DateFrom
AND   [date] <  @DateTo_PlusOneDay

Dear All

There are 3 tables , not 1 table

Thanks

then just JOIN them to get the required result