Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two table, one with detail records (TableDetail) and the other (Table Status) hold the records status (which can be more then one). The link between the two tables is an Order Number. If in TableStatus one of the status's for say Order Number 123 is 1 then I do not want to bring in the record from TableDetail at all in the script.
How do I do this in the script?
Thanks,
Stephen
You can find an example here: [View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.01.15.11.Posted/DeleteRows.qvw]
Yes, my example would do that. Didn't realize you had multiple order statues. IF the example posted doesn't work let me know and I can write one for you. I think his will work good though.
Damián, thanks got it working.
Stephen
I guess, I'm a bit late with this suggestion, but... the easiest way to accomplish what you need is through mapping. Consider the following:
Table1:
load
OrderID,
...
Status
...
;
StatusMap:
mapping load
IrderID, Status
Resident Table1
;
Table2:
load
OrderID,
...
from ...
where
ApplyMap('StatusMap', OrderID) <> 1
;
This way, the unwanted rows never make it to the database in the first place. I have a Wiki page about Mapping where I explain it in more detail...
Oleg,
Won't this approach leave the order if it also has a status of 2? I need the entire order removed, not just the status 1 part.
Stephen