on 12-07-2023 1:59 PM
when i use this query
SELECT
T1."ItemCode",
T1."Dscription",
T1."Quantity",
T3."OnHand" ,
t0."DocDate"
FROM
OWTQ T0
INNER JOIN
WTQ1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN
OITM T2 ON T1."ItemCode" = T2."ItemCode"
INNER JOIN
OITW T3 ON T1."ItemCode" = T3."ItemCode" AND T1."WhsCode" = T3."WhsCode"
WHERE
T0."CANCELED" = 'N'
AND T0."DocStatus" = 'O'
AND T1."FromWhsCod" = 'WR1000'
and Month(T0."DocDate") = [%0]
parameter display as date but i want it be number to can enter number of month
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you only give the number of the month, how does the query know which year?
You could just leave it be and use the year and month of the chosen date:
YEAR(T0."DocDate") = YEAR([%0]) AND MONTH(T0."DocDate") = MONTH([%0])
Now if the user enters for example today's date 8th of December 2023, the query will return results for all of December of 2023.
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
10 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.