Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to update data from a load like in SQL if there is more than one column involved, and so a simple 'If' statement will not work.
I'm looking for an equivalent of SQL of:
UPDATE [tablename]
SET [Branch] = 'EQB'
WHERE [ProductName] = 'Equipment'
I've tried the following Qlikview statement:
If(ProductName = 'Equipment', Branch = 'EQB', Branch) AS Branch and,
If(ProductName = 'Equipment' AND Branch = 'ENG', 'EQB', Branch) AS Branch
I've also joined the main bulk of the data (whilst excluding Branch = 'ENG') and then tried to join/concatenate the last part ProductName 'Equipment'.
None of the above have worked.
What other techniques are there so I can update this data without having to tamper with the raw tables themselves.
Regards,
Nathan
Hi Nathan,
Maybe you can try
If(Match(ProductName,'Equipment') and Match(Branch,'ENG', 'EQB'),Branch) AS Branch
Regards,
Sokkorn
What didn't work when using:
If(ProductName = 'Equipment' AND Branch = 'ENG', 'EQB', Branch) AS Branch
That looks correct. Are ProductName and Branch in the same table?
-Rob