Re: [sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Matthias-Christian Ott
On 2016-09-08 12:17, Paul Sanderson wrote: > How does this work for you to get all the even rows > > SELECT ROWID > FROM table > WHERE ROWID & 0x01 = 0x00 I think you should be able to create an expression index as well: https://www.sqlite.org/lang_createtable.html#rowid - Matthias-Christian _

Re: [sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Clemens Ladisch
Simon Slavin wrote: > ... if your table has lots of rows and/or you do lots of queries like > this, you should consider keeping a copy of the lower 16 bits as > another integer column. In these case, you should consider using an expression index: sqlite> create table t(x,y); sqlite> create index

Re: [sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Paul Sanderson
How does this work for you to get all the even rows SELECT ROWID FROM table WHERE ROWID & 0x01 = 0x00 Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit fo

Re: [sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Simon Slavin
On 8 Sep 2016, at 11:07am, Dave Blake wrote: > Looking for the best way to query a table with an integer column by value > of the lower 16 bits of the data in that column. Does SQLite support > bitwise logic? Yes. You can use the following & | ~ << >> AND OR NOT SHIFTLEFT SHIFTRIGHT However

[sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Dave Blake
Looking for the best way to query a table with an integer column by value of the lower 16 bits of the data in that column. Does SQLite support bitwise logic? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org