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: 
bnelson111
Creator
Creator

Load Where.

Currently I have a working Load where Statement as follows.

Where "SysDate" > '01/01/2015';

How do i add the following where it filter down unnecessary data.

Receipt Info.TxnType equal to 2 or 3 or 6

i have tried

Where "SysDate" > '01/01/2015' and Where [Receipt Info.TxnType] = 2,3,6;

Thanks Brett, Maybe i have had a brain freeze

18 Replies
Not applicable

Hi Brett,

LOAD *

FROM ABC

Where "SysDate" > '01/01/2015' and match([Receipt Info.TxnType],2,3,6);


Hope this helps.


Regards,

Snehal

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Postgress documentation says that it does support an IN operator. The above syntax is (probably) right.

Peter

bnelson111
Creator
Creator
Author

Tried suggested, still getting the following

Getting back the following error

SQL##f - SqlState: S1000, ErrorCode: 4294757240, ErrorMsg: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about "[Receipt Info.TxnType],2,3,6)" (10713)

SQL SELECT *

FROM PUB."PV_InvHistory"

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You're still trying to stuff the match() function call in a SELECT statement. That SELECT statement will be sent as-is to your Postgress database which replies that it doesn't understand QlikView functions (match() is a QlikView function, not a SQL or DBMS function). Which is correct.

What happens if you try

SQL SELECT *

FROM PUB."PV_InvHistory"

WHERE ("SysDate" > '01/01/2015') AND ("Receipt Info.TxnType" IN (2,3,6));

Peter

MayilVahanan

Hi

Try like this

Load * where SysDate > '01/01/2015' and Match( [Receipt Info.TxnType], 2,3,6);

SQL SELECT *

FROM PUB."PV_InvHistory"

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
bnelson111
Creator
Creator
Author

Getting the following.

SQL##f - SqlState: S0022, ErrorCode: 4294757222, ErrorMsg: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Column "Receipt Info.TxnType" cannot be found or is not specified for query. (13865)

SQL SELECT *

FROM PUB."PV_InvHistory"

WHERE ("SysDate" > '01/01/2015') AND ("Receipt Info.TxnType" IN (2,3,6))

bnelson111
Creator
Creator
Author

Everyone answer worked, Im so sorry i found a spelling problem. Sorry thanks everyone..

MayilVahanan

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi,

Filtering the data in the SQL itself is the best method, because you don't need to bring all the data into qlikview and then on top filtering it in Qlikview is not a good practice.  Usually it will take more time to load if data is huge.  So best method is

Data:

SQL SELECT *

FROM PUB."PV_InvHistory"

Where "SysDate" > '01/01/2015' and [Receipt Info.TxnType] IN (2,3,6);

Hope this helps you.

Regards,

Jagan.