Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
datanibbler
Esteemed Contributor

Confused about a code I have developed - please help

Hi,

this is about a code rgd. our personell_data once more, so putting together sample_data would be kind of difficult - I have just written the critical question here, describing the code would be both time-consuming and quite difficult to grasp.

(I assume that the code is working, I have it running for about a week now, but I'm not so sure anymore)

The objective is to historize, on a day-to-day basis, the data about our personell (particularly, the joining_date and the leaving_date) that we get from the database - the database is not historized in a certain aspect, that's why we need this.

The critical question, upon which the functioning of the code hinges, would be:

=> Can I, in a RESIDENT LOAD, implement a WHERE NOT EXISTS() that refers to a field that is not in the table I'm currently loading, but in a previously loaded table?

=> Acc. to the help_file, it seems I can. That would explain it.

Thanks a lot!

Best regards,

DataNibbler

4 Replies

Re: Confused about a code I have developed - please help

In response to this bit of your post :

=> Can I, in a RESIDENT LOAD, implement a WHERE NOT EXISTS() that refers to a field that is not in the table I'm currently loading, but in a previously loaded table?


The field needs to be in both :

  • The load statement with the WHERE NOT EXISTS()
  • A previously loaded statement


Re: Confused about a code I have developed - please help

The answer is:

YES, you may use EXISTS and refer to fields in previously loaded tables

Employee
Employee

Re: Confused about a code I have developed - please help

If you use

     Where Exists( A, B )

then B must exist in the table you are currently loading, and A must exist - but it doesn't matter where.

HIC

datanibbler
Esteemed Contributor

Re: Confused about a code I have developed - please help

Hi all,

thanks a lot! That is all I wanted to know - so I did do it right, which is good ;-) I will just insert one line of comment to make it clear what is done in that clause (I generally stick to inserting roughly 1 line every 5 lines of code, or wherever some explanation is needed)

Best regards,

DataNibbler

Community Browser