Symptom:
After a user creates a new item, 50% of itm_price data is empty after uploading, except for modidate.
Cause:
Modify the SQL statement of the samsara script:
SQL = SELECT * FROM (ITM_PRICE INNER JOIN USR_BOX AS USR_BOX_OUT ON outer = outer) INNER JOIN USR_BOX AS USR_BOX_IN ON outer = outer) WHERE ITM_PRICE.ITEMCODE =: ITEMCODE AND outer =: USRBOXCODE,
The queried column is not itm_price. Therefore, the column is filtered out when it is added to the pool in the samsara layer. The next exchange operation will operate on the new data, as a result, itm_price contains NULL data.
Solution:
SQL = SELECT ITM_PRICE. * FROM (ITM_PRICE inner join USR_BOX AS USR_BOX_OUT ON ITM_PRICE.USRBOXCODE = outer) inner join USR_BOX AS USR_BOX_IN ON condition = outer) WHERE ITM_PRICE.ITEMCODE =: itemcode and condition =: USRBOXCODE,
Then the problem is discovered:
The problem persists. debug again and find that the join SQL statement is used. The resulting table has no table name. As a result, an error occurs again when the table is added to the pool. Only samsara code can be modified, force table settings. tableName
Then we found the problem 080929:
Only one item is input, but the user has 10 grids. Therefore, itm_price corresponds to 10 records in the same shop.
Because the script wants to modify all the itm_price of the same store, and only one item is input, the stream mismatch occurs in samsara.
Modification: the price adjustment of the product arrival can only be effective in usrbox, not in shop