Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Function "bitand"

Hey there!

Did anybody already use the function "bitand" successfully? The manual unfortunately doesn't contain an example for its usage .

I tried to use it this way: bitand(integer,integer). During execution of the script I get the following error:

Error in expression:

BITAND is not a valid function

Thank you in advance for your help.

Best regards

Chris



5 Replies
frank_carlsson
Partner
Partner

I have used it like this:

Prodtr_lev:

Load

AcYrPr

as Avstämmningsperiod

,

Replace

(trim(upper(InvoRef)),' ','') as InvoRef

,

DAm

as DAm

,

OrdNo

,

SupNo

,

TransSt

,

ExcPrint

,

Num

(TransSt,'(bin)') as Transstatus

,

Num

(ProcMt,'(bin)') as Bitvalue1

,

Num

(ExcPrint,'(bin)') as Bitvalue2

,

Num

(EditPref,'(bin)') as Bitvalue3

,

Num

(EdFmt,'(bin)') as Bitvalue4

,

Num

(SpecFunc,'(bin)') as

Bitvalue5

;



SQL

SELECT *

FROM

$(Company)

.dbo.ProdTr

Where



TrTp = 6 and FinDt >= 20100501 and (SupNo <> 0 or SupNo = 1001);

//and OrdNo <> 1;// and Ctrl = 0;

Temp:

Noconcatenate

Load

*

,

if

(16384 Bitand Bitvalue2 = 16384,1,0) as Bv2

,

if

(16 Bitand Transstatus = 16,1,0) as

Trst

Resident

Prodtr_lev;

and in Where clause:







WHERE

OrdNo > 35600 AND TrTp = 1 AND applymap('mOrdTp',OrdNo) <= 4 And OrdLnSt bitand 8 = false() ;

frank_carlsson
Partner
Partner

Wow, that looked really awful... hope you can read my example.

Not applicable
Author

thanks! It works 🙂

alexmosq
Partner
Partner

Thanks dude!

rupalimane1390
Contributor III
Contributor III

Thank you @frank_carlsson . i was struggling since a week to use BITAND expression of oracle in Qlik.

Thanks a ton for detailed code 🙂