Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Delete records in cascade

Hello;

I have a file with data from 2004 to 2015. I want to have only the data from 2015.


I deleted rows from the fact table where date<2015, but i like to delete all in cascade.

I want to delete all rows from all tables that have no relation with the fact table with data of 2015.


I can delete rows from all tables ono to one, but there are more than 50 tables.


I want to know if exists a way to delete all with one instruction? Something like DELETE IN CASCADE


Thanks

Fernando

1 Solution

Accepted Solutions
marcus_sommer

I don't think that there are many possibilities to automate such data-reduction then you need to consider the key-fields and the relations between all tables. But maybe you could use statements like KEEP or (not) EXISTS to make that handling easier.

- Marcus

View solution in original post

4 Replies
marcus_sommer

I don't think that there are many possibilities to automate such data-reduction then you need to consider the key-fields and the relations between all tables. But maybe you could use statements like KEEP or (not) EXISTS to make that handling easier.

- Marcus

Kushal_Chawda

It's not possible in Qlikview.But you can do it by using left join with Exist fuction.

For example

Fact1:

load *

From Fact

where Year<2015

left join

load *

from dimension1

.

.

left join

load *

from dimension2

Fact2:

load *

from Fact2

where exists(KeyfromFact1, keyfromFact2);

Not applicable
Author

Thanks Kush

Not applicable
Author

Thanks Marcus