you can use the Join Load to append the field. For this you need a valid key. "[Stock Movement Reason Code]" looks like a candidate (key) for me.
With this precondition a third load may look like
[Stock Movement Reason Code], // key to link both tables correctly
[Stock Reason] AS StockReasonNew
no, that doesn't matter. Once you load external data into a QV-table, the data has no technical relationship to its source.
If your script above works correctly (and the needed files exist) you should have (at least) two QV-internal tables:
Once loaded both tables I want you to do a resident load from the (as still mentioned: internal) table "StoreStockMovement" to merge [Stock Reason] to "StoreReasonCode" and rename it to "StockReasonNew" to avoid cyclic links.
My code snippet isn't syntax checked.
sorry, but I didn't recognize your Join-Load until now:
. . .
Because of this Join LOAD you do not have a table called "StoreStockMovement" as you joined it to the prior loaded table.
Please replace the tablename after my "Resident" with the tablename you joined "StoreStockMovement" to.
the reasons why you are getting a sync table are the identical fieldnames in "StoreReasonCode" and "ProductSafe". Now there are two possibilities:
- Join the two tables via a QV-Join (as you did with "StoreStockMovement" and "ProductSafe" before)
- or keep the two tables and link them together
In both cases you need (one or more) matching keyfields. If you got one keyfield, rename the others i.e. into "StockReason_SRC" and "StockReason_PS". If your key is a combination of several fields then you can use a function like AutoNumber() to create a new surrogato key. For ex:
AutoNumber(StockReason & StockMovementreasonCode, 1) as StockReason_ID
in BOTH tables and one script.