on 06-12-2023 1:28 AM
Hello Can you please help me fix this query :
SELECT T1."Price" into pght FROM ITM1 T1 WHERE T1."PriceList" = '1';
UPDATE "ITM1"
SET ITM1."Factor" = T2."U_COEFFICIENT" , ITM1."Price" = T2."U_COEFFICIENT" * pght
FROM ITM1
INNER JOIN OITM T0 ON T0."ItemCode" = ITM1."ItemCode"
INNER JOIN OMRC T1 ON T1."FirmCode" = T0."FirmCode"
INNER JOIN "@PR_MARQUES_ASSOCIE" T2 ON T1."FirmName" = T2."U_MARQUES"
WHERE T2."U_MARQUES" = 'ROCHAS' AND T2."Code" = '01' AND ITM1."PriceList" = '2' AND T1."FirmName" = 'ROCHAS';
Actually my goal is to update the column ITM1."Price" where ITM1."PriceList" = '2' with the price Value where the "PriceList" = '1' * factor
For exemple ITM1."Price" and "PriceList" = '1' = 40 $ ITM1."Factor" = T2."U_COEFFICIENT" = 4
Then ITM1."Price" and "PriceList" = '2' = 160 $
i tried the above query (in the body) and i think its not correct
User | Count |
---|---|
86 | |
9 | |
6 | |
6 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.