Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Loss after DROP FIELD statement

Dear Community,

has anyone experienced the loss of a record from a table after dropping a field (unique identifier) that is the unique difference between 2 records??

When trying to simulate this case QV seems to work in the proper way!!

Enclosed is the simplified example of the case (however it works perfectly well!) while irl in our App we lose a record. When undoing the drop of the field everything worked fine again...

Best regards

P.

13 Replies
Not applicable
Author

Hi Jonathan,

thx for your post.

We're positive the record has vanished (checked with statistics box on the amount with the correct selection).

Indeed there are preceding joins with the distinct keyword on the table. The keyfields used for the join however are not the ones which we drop later on. That makes a difference or is your explanation still valid?

So as a test it would be good to copy the complete table in the script and do a similar drop of the field and than check the results?

Thx for your post

BR

P.

Anonymous
Not applicable
Author

concerate the two tables than solve your problem

jonathandienst
Partner - Champion III
Partner - Champion III

>>Indeed there are preceding joins with the distinct keyword on the table. The keyfields used for the join however are not the ones which we drop later on. That makes a difference or is your explanation still valid?

Yes. The attribute is set for the table as a whole, so it looks at the entire record, regardless of when or how fields are added or removed.

>>So as a test it would be good to copy the complete table in the script and do a similar drop of the field and than check the results?

I am not sure about that. I don't think the distinct attribute persists when copied to a qvd and it certainly doesn't when copied to text/excel. I don't know about a binary load. But in general, there needs to be at least one load with distinct targetting the table to set the attribute.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
enriquem
Creator
Creator

Hi,

I found the same error, and it's occurs when you do a join between 2 tables and the you drop a field in the table. If some rows have the same data, this will disappear in the 'drop field...' sentence by the pre join. I don't know why occurs, but you can solve it without the 'drop field...' sentence and using an post load with all the field of the previous table without the field you wanted to delete.

Hope this help!

Kind Regards,
Enrique Mora.