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

Where statement in load script won't work

Hi,

I have a where function in the scirpt below. But it don't work. Has you some ideas how to fix this?

The is imported of a mssql server environment.

rept_category_navigation:

Load

//    site as land,

    "super_category_display_name" as super_category,

    main_category_display_name as main_category,

    category_unique_name as unique_name,

    category_hidden,

    super_category_hidden,

    main_category_hidden

from "Reporting_db".dbo."rept_category_navigation"

where((category_hidden='0') OR (super_category_hidden='0') OR (main_category_hidden = '0'));

3 Replies
marcus_sommer

'0' is a string - maybe you need it numerical without quotes.

- Marcus

vgutkovsky
Master II
Master II

Shouldn't it be "SELECT" instead of "LOAD"? LOAD is a QV-specific keyword and you're loading from a DB it seems.

Vlad

IAMDV
Master II
Master II

Vlad is right. Looks like you're mixing ANSI SQL code with the LOAD statement. Clearly you're referencing the database name, schema name and object name.

You need somthing like this:

Load *;

SELECT

//    site as land,

    "super_category_display_name" as super_category,

    main_category_display_name as main_category,

    category_unique_name as unique_name,

    category_hidden,

    super_category_hidden,

    main_category_hidden

from "Reporting_db".dbo."rept_category_navigation"

where((category_hidden='0') OR (super_category_hidden='0') OR (main_category_hidden = '0'));