Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)') asBitvalue5
;
SQL
SELECT *FROM
$(Company).dbo.ProdTr
Where
//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) asTrst
Resident
Prodtr_lev;
and in Where clause:
WHERE
OrdNo > 35600 AND TrTp = 1 AND applymap('mOrdTp',OrdNo) <= 4 And OrdLnSt bitand 8 = false() ;Wow, that looked really awful... hope you can read my example.
thanks! It works 🙂
Thanks dude!
Thank you @frank_carlsson . i was struggling since a week to use BITAND expression of oracle in Qlik.
Thanks a ton for detailed code 🙂