Skip to Content
J S

Query with Parameters

Hi

I have below code and i want to add From Date & To Date parameter & also Warehouse Parameter

SELECT T0.DocNum, T0.DocType, T0.DocDate, T0.CardName, T0.DocTotal, T0.U_TranCat, T1.DocEntry, T1.Dscription, T1.Quantity, T1.Price
FROM dbo.OWTR T0 INNER JOIN dbo.WTR1 T1 ON T0.DocEntry = T1.DocEntry

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 29, 2020 at 09:25 AM

    try this

    SELECT T0.DocNum, T0.DocType, T0.DocDate, T0.CardName,
    T0.DocTotal, T0.U_TranCat,
    T1.DocEntry, T1.Dscription, T1.Quantity, T1.Price
    FROM OWTR T0
    INNER JOIN WTR1 T1 ON T0.DocEntry = T1.DocEntry
    Where T0.DocDate >=[%0] and T0.DocDate <=[%1] and T1.FromWhsCode=[%2]

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.