Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
After loading a large table, I will need to select an individual record by "TRANS_NUMBER" and update "status" column with text. How do I do that? The transaction_number column values are alphanumeric. And is there a way to select multiple records by TRANS_NUMBER and updating them all with the same status?
For example:
TRANS_NUMBER | Status |
1347 | Needs Action |
I would like to change the Status of TRANS_NUMBER 1347 from Needs Action to Approved.
Thanks in advance for your help!
Ok, just create variables for the set of Transaction numbers and the value to change to, then the statement could look like:
UPDATE Trans SET Value= vValue WHERE match(TransNumber,$(vTrans));
You can use Dynamic Update to update your field values on the server, but these changes will not persist or promote to the source DB.
If that's what you want, enable Dynamic update, then create a button with External - Dynamic Update action and a statement like
UPDATE TransactionTable SET status='Approved' WHERE TRANS_NUMBER=1347;
Create the Mapping table and create the new field or change the value on the existing field while loading the data into qlikview..
Swuehl,
The TRANS_NUMBER wont always be 1347. The TRANS_NUMBER will depend on what I select and there may be multiple TRANS_NUMBER selected at once. Please advise.
Dathu_qv,
I will need to load the script first and view the table before making changes. Does a mapping table still work for this?
Absolutely it works...
Temp:
LOAD * FROM SourceTable ;
MAP_TAB:
Mapping LOAD KEY, VALUE From source ;
MAIN:
LOAD *, ApplyMap('MAP_TAB',KEYFIELD,KEYFIELD) AS NEWFILED
Resident Temp;
DROP Table Temp;
Please post some sample data if you need full script....
Ok, just create variables for the set of Transaction numbers and the value to change to, then the statement could look like:
UPDATE Trans SET Value= vValue WHERE match(TransNumber,$(vTrans));
that did the job thanks swuehl!!!
I have tried your example app, I am using v11.2 SR5 and upgraded to SR7, but it doesn't appear to work in either. What version are you using?
It's not working for me too, I am using SR7.