Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum



Reply
 
LinkBack Thread Tools Display Modes
Old 2010-07-27   #1 (permalink)
Junior Member
 
Join Date: Jun 2010
Posts: 6
Default Bit-wise function

Hi all,

Does VW support Ingres Bit-wise functions in the where clause? We would like to combine multiple bits as an int on a column, then filter out rows based on a bit mask.

If it's not supported, we are thinking split multiple bits as separate columns as char(1). Any better suggestion? Thanks.

Andy
AndyMei is offline   Reply With Quote
Old 2010-07-27   #2 (permalink)
Moderator
 
Join Date: Aug 2009
Location: Redwood City, CA
Posts: 187
Blog Entries: 1
Default

No, Ingres VectorWise currently does not support the Ingres bit functions.

What you've suggested doing sounds like a workable approach.
zelaine is online now   Reply With Quote
Old 2010-07-28   #3 (permalink)
Ingres Community
 
rhann's Avatar
 
Join Date: Mar 2007
Location: roy.hann@rationalcommerce.com
Posts: 438
Blog Entries: 15
Default

My IVW machine seems to be powered down at the moment and there's no one in the office to switch it on, so I'm only guessing this will work with IVW.

Ingres SQL allows you to do the calculations to get at individual bits albeit indirectly. If you have an INTEGER column called map, and you count bits from 0 starting at the low-order end, you can extract the value of bit 3 (i.e. the fourth bit) using ...WHERE mod(map/2**3,2)=1. If you want rows where the fourth bit and the twelth bit (bit 11) are set, you can use ...WHERE mod(map/2**3,2)=1 AND mod(map/2**11,2)=1, and so on.
__________________
Roy Hann

UK Ingres User Association Conference 2011 will be on Tuesday June 7, 2011. Mark the date in your diary.
rhann is offline   Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved