Android Question SQLite 64bit AND query

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I need to do a 64 bit And ( & ) request in a SQLStatement

If C++ I use to do something like this
B4X:
"SELECT ID,  Primary, Secondary Special FROM Songs  WHERE ((Category & '%I64d') and (Secondary & '%I64d') and ((Special & '%I64d') == 0))"

How do I do a 64bit AND in a SQLite statement in B4A

Thanks

BobVal
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I have 64bit data fields that I want to select
Look at it this way.

Blue = 0x01
Red = 0x02
Green= 0x04
Pink =0x08

Take this out -- another 30 bits or more for 60 colors (NOTE just using colors as an example)

Now I ask you what you desire. You pick your options and I "OR" them together and do a "select xxx where (Colors & YourChoices) "
AND-ing one INTEGER to another will produce a list of matches without a lot of compare
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
No, I didn't. Just about to start converting a lot of lines of code and wanted to get it right the first time.

I know B4A needs to have special routines for & (and) and | (or) when using longs. Didn't know if SQLite would have a problem.

All this code works in windows, was hoping it would be an easy port.

Thanks for the clarification

BobVal
 
Upvote 0
Top