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

Significance of where 1=1 ?

Example:

                mapping Load distinct

                 col1,

                col2

  from abc.qvd

where 1=1

i came across a script in the above format,

Could some one explain the significance of where 1=1

B~

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

In some versions, some operations reading qvds generated erros when there was no operation in a field or a where clause. QlikView would use the optimized read and the operation would fail.

I`m almost sure that mapping was one of this cases.

So, we used the where 1=1 to avoid the optimized read and make it work

Hope this helps,

Erich

View solution in original post

5 Replies
erichshiino
Partner - Master
Partner - Master

In some versions, some operations reading qvds generated erros when there was no operation in a field or a where clause. QlikView would use the optimized read and the operation would fail.

I`m almost sure that mapping was one of this cases.

So, we used the where 1=1 to avoid the optimized read and make it work

Hope this helps,

Erich

Anonymous
Not applicable
Author

in version 10 is it necessary to use where 1=1 or is it fine if its not used ?

B~

erichshiino
Partner - Master
Partner - Master

I`m sorry, but I will not be able to try it on version 10 right now.

If I remember correctly you would get an error message when you had the problem.

Anonymous
Not applicable
Author

oh..thank u Eric ..appreciate ur help

B~

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It's not necessary in V10.