Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Question to bit flag

Hi,

i have the following SQL Code:

mySQL:

SELECT unique

      FROM table1

      WHERE (bitflag& 64) >> 6 = 1)

In the QlikView I want a flag:

Table:

Load unique,

if(si_flags & 64 >> 6=1, 'bitflag64', 'no bitflag64') as myflag;

SQL

Load *

from table1;

But I get not the same result.

Labels (1)
3 Replies
stabben23
Partner - Master
Partner - Master

Hi Marcus,

maybe you should try to "encapsulate" the Field?

if("si_flags & 64 >> 6"=1, 'bitflag64', 'no bitflag64') as myflag;

qlikconsultant
Creator III
Creator III
Author

I tried ", ' and (. All do not work.

qlikconsultant
Creator III
Creator III
Author

It seems that this is the solution:

if((si_flags >> 6 )=1, 'bitflag64', 'no bitflag64') as myflag;