Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
skelly328
Not applicable

Data Load Editor only processing part of where clause

Hello all, [insert "new to Qlik and very rusty with SQL" disclaimer]

I'm creating my first app, and I added data using the add data tool and made associations in the data manager.  To pre filter my data, I then unlocked the auto generated section in data load editor and entered some basic where clauses in the load statements.  From the attached image you can see there are two areas where I entered where clauses...the first section limits to appointments from three days ago that have an arrived status and have been edited.  When I load the data, it is filtered per these specifications as expected.

There is a second where clause I put in to limit appointment provider credentials to 'APRN', however when I load the data, I am still getting all providers (APRNs, MDs, DPTs, PAs etc) instead of just appointments with APRNs.  I'm new to data load editor, haven't used SQL in about 6 years and wasn't an advanced user to begin with, so I'm sure it has something to do with me not understanding load order?  I do not get an error in the data load progress box or debugger, it shows 'finished successfully', however I'm seeing more than just APRN appointments in the results.  Thank you in advance for any and all help!

Capture2.JPG

1 Solution

Accepted Solutions
parthakk
Not applicable

Re: Data Load Editor only processing part of where clause

Hi Sarah,

The where condition which you had written is above the SQL part. Its called as preceding load. You need to write the where condition after SQL part

Exampl--

Table:

load

     Field1,

     Field2,

     Field3;

SQL Select

     Field1,

     Field2,

     Field3

From "DB name"."owner name"."Table Name"

where Field2 = 'APRN';

Thanks,

Partha K

4 Replies
mov
Not applicable

Re: Data Load Editor only processing part of where clause

Technically, I don't see anything wrong.  Check your script, maybe the same field "cred" exists in another table not showing in the script above.

Logically, not sure why you're loading this, it just creates one field with one value.  If you really need it for so"me reason, you could've used

provide_t:

LOAD

     'APRN' as cred

AUTOGENERATE 1;

skelly328
Not applicable

Re: Data Load Editor only processing part of where clause

Logically, not sure why you're loading this, it just creates one field with one value.

It is a standard practice of respect we give to all of our medical providers.  While yes, the report will only show APRNs and there will only be one field value of 'APRN', they still deserve to have the distinction of their earned credentials appear next to their names.

Thank you for your alternate script, unfortunately I am still getting the same results.

parthakk
Not applicable

Re: Data Load Editor only processing part of where clause

Hi Sarah,

The where condition which you had written is above the SQL part. Its called as preceding load. You need to write the where condition after SQL part

Exampl--

Table:

load

     Field1,

     Field2,

     Field3;

SQL Select

     Field1,

     Field2,

     Field3

From "DB name"."owner name"."Table Name"

where Field2 = 'APRN';

Thanks,

Partha K

skelly328
Not applicable

Re: Data Load Editor only processing part of where clause

Thank you Partha, this worked perfectly!