6

Getting fetch returns more than requested number of rows error SQL HANA SAP

 11 months ago
source link: https://answers.sap.com/questions/13900183/getting-fetch-returns-more-than-requested-number-o.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
15 minutes ago

Getting fetch returns more than requested number of rows error SQL HANA SAP

5 Views

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK