Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2006, 10:13 AM
Registered User
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Just thought I'd help resolve the last bit....
Create an acccess table with two fields: BitIndex & BitBinary.
Enter the following:
BitIndex BitWise
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
16 10000
17 10001
18 10010
19 10011
20 10100
21 10101
22 10110
23 10111
24 11000
25 11001
26 11010
27 11011
28 11100
29 11101
30 11110
31 11111
32 100000
33 100001
34 100010
35 100011
36 100100
37 100101
38 100110
39 100111
40 101000
41 101001
42 101010
43 101011
44 101100
45 101101
46 101110
47 101111
48 110000
49 110001
50 110010
51 110011
52 110100
53 110101
54 110110
55 110111
56 111000
57 111001
58 111010
59 111011
60 111100
61 111101
62 111110
63 111111

Then, the query you are generating, use the following for each bitwise entry as described above.

 IIf((( SELECT BitWise.BitWise FROM BitWise WHERE BitIndex=CheckBoxesTicked )-1) Mod 10=0,-1,0) AS One, IIf((( SELECT BitWise.BitWise FROM BitWise WHERE BitIndex=CheckBoxesTicked)\10-1) Mod 10=0,-1,0) AS Two................

where CheckBoxesTicked has a value of between 0-63

Clearly, I only did the first 64 entries.. real pain!

enjoy.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bitwise OR -pages 84, 85 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 1 June 24th, 2006 10:43 PM
SQL Access/ASP.NET data access issue saeta57 SQL Server ASP 1 July 4th, 2004 04:29 PM
SQL Access/ASP.NET data access issue saeta57 Classic ASP Databases 1 July 4th, 2004 03:32 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.