on 2021 Jan 13 7:42 AM
Greetings,
I have some difficulties when placing my query on UDV, below is my query to get price list based on document date in the active Sales Order
SELECT Price FROM ITM1 T0
INNER JOIN OPLN T1 ON T1.[ListNum] = T0.[PriceList]
WHERE ItemCode = $[RDR1.ItemCode]
AND Year($[ORDR.DocDate]) = Year (T1.[ValidFrom])
the date display in general settings - tab displays is DD/MM/YY
I recognize it has no problems from 1st Jan 2021 to 12th Jan 2021 when 13th Jan 2021 it shows error like this : [conversion failed when converting date and/or time from character string], so I checked my query using user queries and shows like this
SELECT Price FROM ITM1 T0
INNER JOIN OPLN T1 ON T1.[ListNum] = T0.[PriceList]
WHERE ItemCode = N'00017-25MG '
AND Year(N'13.01.21')= Year (T1.[ValidFrom])
if I change general setting - tab displays date format to MM/DD/YY my query has no problems, but my clients would not like that option
please help me with this query
Thank you very much
Request clarification before answering.
User | Count |
---|---|
102 | |
15 | |
9 | |
7 | |
4 | |
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.