Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Not Exists issue, create new rows in a table

I have a document where I am loading 2 QVD'S Quote and Quotedtl.

The Quotedtl is set to a left keep.

Now due to some complicated table structures and linking I have come across an issue. Currently a record can exist in the Quote QVD where there are no existing lines. As I said to due linking going through the Quotedtl table to get to the Quote table, I loose all of these records.

What I need is in addition to the above qvds, I need to load a "Blank record" into the line table when there is a quote record but no lines.

Linking between the 2 tables is done via company & '-' & quotenum

Anyone have ideas? I tried creating a Not Exists where clause on a resident loaded Quote but this returned no records.

Tags (2)
2 Replies
Not applicable

Re: Not Exists issue, create new rows in a table

i would consolidate your 2 tables into one.  load the Quote, and left join Quotedtl.  this 'denormalization' is a very common technique with 'header' and 'lines' type of data sets. 

Tammy

Not applicable

Re: Not Exists issue, create new rows in a table

This was the first thing I tried, there was just unforeseen results due to some resident loads and a link table that I created. I don't know what caused it, but it made qlikview and my desktop hang to where I had to do a reboot.

I found the solution on another thread, I did not realize that the Exists function has the ability to use dual arguments, so I just changed it to Not Exists(company,quotenum)

Community Browser