Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

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

Select *

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

Anonymous
Not applicable
Author

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

el_aprendiz111
Specialist
Specialist

Hi

where

( OrderNum  <> 1234567);

sunny_talwar

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);

Anonymous
Not applicable
Author

did yo find an answer? 

I think the correct code is 

where

( OrderNum  <> '1234567');

Anonymous
Not applicable
Author

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

Siva_Sankar
Master II
Master II

Use the below one..

LOAD

CustNum,

OrderNum,

SalesRepList,

CheckBox06,

Company,

RepRate1;

SQL Select  *

FROM PUB.OrderHed

where

OrderNum <> '1234567';