Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

lynnmiao
New Contributor II

How to exclude a record in the script?

Hi guys,

We are experiencing some problem in the database which stopped QV from reloading. We've pick a few records and we'd like to exclude them from the script to try to catch the problem but I keep getting syntax error.

Here is my script. I am trying to exclude OrderNum = 1234567 but it stopped right at SQL select *. Please help.

LOAD
CustNum,
OrderNum,
SalesRepList,
CheckBox06,
Company,
RepRate1
SQL Select *

FROM PUB.OrderHed

where

not

( OrderNum = 1234567);

7 Replies

Re: How to exclude a record in the script?

Have you tried running this outside of QlikView, in Toad?

Select *

FROM PUB.OrderHed
Where not (OrderNum = 1234567);

lynnmiao
New Contributor II

Re: How to exclude a record in the script?

Thanks for answering. We don't have Toad. I can only test it in QV...:(

el_aprendiz111
Valued Contributor

Re: How to exclude a record in the script?

Hi

where

( OrderNum  <> 1234567);

Re: How to exclude a record in the script?

I guess you need to figure out if the SQL syntax is right or not.... try this

LOAD
CustNum,
OrderNum,
SalesRepList,
CheckBox06,
Company,
RepRate1;

Select *

FROM PUB.OrderHed
Where OrderNum NOT IN (1234567);

kathleene
New Contributor III

Re: How to exclude a record in the script?

did yo find an answer? 

I think the correct code is 

where

( OrderNum  <> '1234567');

robin_hausdoerfer
Valued Contributor III

Re: How to exclude a record in the script?

which kind of database do you use: Oracle, MS SQL, MySQL?

Siva_Sankar
Honored Contributor

Re: How to exclude a record in the script?

Use the below one..

LOAD

CustNum,

OrderNum,

SalesRepList,

CheckBox06,

Company,

RepRate1;

SQL Select  *

FROM PUB.OrderHed

where

OrderNum <> '1234567';