Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exclude value in loading script

Hi guys,

I have a script where I load all of my credits.

There is one specific credit note that has to be excluded.

I tried to do this by using the following expression in my script:

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE([Invoice Number] <> 'Credit-1234')

That didn't work. Would be great if you guys could help me out:)

Mike

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try wit match()

Where match(Document No_,'credit-1234')=0:

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
vinieme12
Champion III
Champion III

Try wit match()

Where match(Document No_,'credit-1234')=0:

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
jayaseelan
Creator III
Creator III

Hi Mike,

Try the following script.

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE NOT WILDMATCH(invoicenumber,'*credit-1234*');

THANKS

sravanthialuval
Creator
Creator

Hi,

Aliases which will you created in the table, we can't  able to reuse in the same table.

Try this below code using original field name in where condition.

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE  "Document No_" <> 'Credit-1234' ;

mayuresh_d
Partner - Creator
Partner - Creator

hi,

it is best to use match as invoice number has text data type  . hence use following script

Credit:

LOAD

     No_ as Item,

    "Sell-to Customer No_" as Sell-to-Customer,

    "Document No_" as Invoice_Number

FROM ["our database".qvd]

(qvd)

WHERE NOT MATCH(Invoice_Number,'*Credit-1234*');

ogster1974
Partner - Master II
Partner - Master II

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE NOT MATCH([Document No_], 'Credit-1234')

Anonymous
Not applicable
Author

That works!:)

Anonymous
Not applicable
Author

That is also working! Unfortunately I can't give two answers the correct button..

Thanks Andy and Sravanthi!

rahulpawarb
Specialist III
Specialist III

Hello Mike,

I agree with Sravanthi! Use Field Name in WHERE criteria i.e. WHERE  [Document No_] <> 'Credit-1234' ;

Regards!

Rahul