Ah, you changed the question :) You originally said AND, now it is OR! It doesn't change the problem much.
Step 1: Create your mask Step 2: Zero out the bits we don't care about with Step 3: If we are left with anything, we have records that contain a flag. WHERE myColumn & myMask > 0 enjoy! -jeff >This was exactly what I was doing - irrespective of the CAST to change data >types - but it will only select records that have bit 1 AND Bit 8. What I >need to do is to select records that contain Bit 1 OR Bit 8. (example values >only) > >Example: Given these values > >BigIntColumn >================== >1 >2 >4 >8 >128 >129 >256 >257 > >Select >============== >1 = (bit 1) >5 = (bit 1 + bit 3) >128 = (bit 8) >129 = (bit 1 + bit 8 >257 = (bit 1 + bit 9) > > > >I am so confused :( > > >Best Regards, > >Dennis Powers >UXB Internet - A website design and Hosting Company >690 Wolcott Road >P.O. Box 6029 >Wolcott, CT 06716 >Tel: (203)879-2844 >http://www.uxbinternet.com/ >http://www.uxb.net/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298260 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4