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.

jenmclean
New Contributor III

Exclude an Invoice

Here is my script:

InvoiceHistoryLineItem:
LOAD TIHLBRAND,
     TIHLBRDCST,
     TIHLCLSPRD,
     TIHLNUMBRD,
     TIHLNUMCST,
     TIHLNUMINV,
     TIHLNUMLIN,
     TIHLOPCST,
     TIHLOPDTE,
     TIHLOPFET,
     TIHLOPINNB,
     TIHLOPQTY,
     TIHLOPVNNB,
     TIHLYRPRIN
FROM

(txt, utf8, embedded labels, delimiter is ',', msq);

Store * from InvoiceHistoryLineItem into [QVD\VH\InvoiceHistoryLineItem_2.qvd] (qvd);
Drop Table InvoiceHistoryLineItem;

I need to exclude one invoice number (4175709) with bad numbers using the TIHLNUMINV field. There are over 3M records so manually doing this is not an option.

How would I complete this?

Thanks in Advance!

Tags (1)
1 Solution

Accepted Solutions
Luminary
Luminary

Re: Exclude an Invoice

Hi,

Is this not just as easy as putting a where clause into the load from the CSV:

...

FROM

(txt, utf8, embedded labels, delimiter is ',', msq)

Where TIHLNUMINV <> 4175709;

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

2 Replies
MVP
MVP

Re: Exclude an Invoice

Maybe like

InvoiceHistoryLineItem:
LOAD TIHLBRAND,
     TIHLBRDCST,
     TIHLCLSPRD,
     TIHLNUMBRD,
     TIHLNUMCST,
     TIHLNUMINV,
     TIHLNUMLIN,
     TIHLOPCST,
     TIHLOPDTE,
     TIHLOPFET,
     TIHLOPINNB,
     TIHLOPQTY,
     TIHLOPVNNB,
     TIHLYRPRIN
FROM

(txt, utf8, embedded labels, delimiter is ',', msq)

WHERE TIHLNUMINV <> 4175709;

Store * from InvoiceHistoryLineItem into [QVD\VH\InvoiceHistoryLineItem_2.qvd] (qvd);

Drop Table InvoiceHistoryLineItem;

Luminary
Luminary

Re: Exclude an Invoice

Hi,

Is this not just as easy as putting a where clause into the load from the CSV:

...

FROM

(txt, utf8, embedded labels, delimiter is ',', msq)

Where TIHLNUMINV <> 4175709;

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond