Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Where clause

Hi Everyone

I would like to exlude values from a table that I load from an sql database with a "Where" clause. I just do not seem to get the syntax right...

This is what I tried:

LOAD [Invoice Number]  Where ([Invoice Number] <> 0)

SQL SELECT..

Thank you very much for your help!

8 Replies
Not applicable

Re: Where clause

load ....

sql select...........

where col=value;

bbi_mba_76
Valued Contributor

Re: Where clause

Hi,

is there the ";" ?

LOAD [Invoice Number]  Where ([Invoice Number] <> 0)

;

SQL SELECT..

Not applicable

Re: Where clause

where should come after select coz ur getting only the that u need from the db. so try with my syntax... I can try for u if u share ur file

Not applicable

Re: Where clause

This is my SELECT statement:

SQL SELECT

ardatum,

    Year (ardatum) as Jahr,

    Month (ardatum) as Monat,

    jobnr,

    netto,

    fw,

    prodnr,

   "Invoice Number",

    firma,

    kurs

FROM EASY."ar_kopf";

Not applicable

Re: Where clause

SQL SELECT

ardatum,

    Year (ardatum) as Jahr,

    Month (ardatum) as Monat,

    jobnr,

    netto,

    fw,

    prodnr,

   "Invoice Number",

    firma,

    kurs

FROM EASY."ar_kopf" where [Invoice Number] != 0;

Not applicable

Re: Re: Where clause

load (all ur fields) SQL SELECT ardatum,     Year (ardatum) as Jahr,     Month (ardatum) as Monat,     jobnr,     netto,     fw,     prodnr,   "Invoice Number",     firma,     kurs FROM EASY."ar_kopf"; where [Invoice Number]=value;

Not applicable

Re: Where clause

Awesome! Thanks Thomas and Sneha!

Not applicable

Re: Where clause

What is the filter in the your Where Clause.

If you are writing the Where Clause in SQL SELECT statement, follow the SQL query format rules not Qlikview.

SQL SELECT

ardatum,

    Year (ardatum) as Jahr,

    Month (ardatum) as Monat,

    jobnr,

    netto,

    fw,

    prodnr,

   "Invoice Number" AS INVOICE_NUMBER,

    firma,

    kurs

FROM EASY."ar_kopf"

Where "Invoice Number" !=0 ;