on 05-15-2017 11:02 AM
Hi All
When i want to sum up quantities of each item to an UDF in Sales Order I get an following error.
SELECT SUM(Quantity) FROM ORDR, RDR1 WHERE U_NoOfPcs=$[RDR1.quantity.number]
Incorrect syntax near 'RDR1.quantity.number'.
Thanks in Advance
Hi,
Could you post your working FMS here to check? Your first post and reply is not related.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
That query makes no sense at all.
Don't you mean that FMS to be in the U_NoOfPcs UDF, triggered by each change in DocTotal, and shouldn't the query be something like this?
SELECT SUM(ISNULL(t1.Quantity,0))
FROM ORDR t0
INNER JOIN RDR1 t1 ON t0.DocEntry = t1.DocEntry
WHERE t0.DocNum = $[ORDR.DocNum]
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 |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.