T
TipTop
Hi NG,
I would like to store a flag for weekdays for each record in my table.
By this I mean, the user can (for one record) flag Monday thru Sunday as
True or False.
I could obviously have one boolean field for each weekday. However, it
occurs to me it would be neater to store all the data as one byte
whereby each bit would represent one weekday e.g.
Bit number: 1 0 1 0 1 0 0
Weekday: M T W T F S S
Status: Y N Y N Y N N
This would give us:
-SSFTWTM
Base2: 00010101
Base10: 21
If I pull the byte back from the database I can easily work with it but
I want to know if there are any bit level operations I can carry out
using standard Access SQL. e.g. to know if a record is valid for a
Monday I need to know that the first bit = 1.
Is this possible? And also, is it really worth it or should I just go
with separate fields (certainly that would be easier for reading the
database directly)?
Thanks for any advice.
Tiptop
I would like to store a flag for weekdays for each record in my table.
By this I mean, the user can (for one record) flag Monday thru Sunday as
True or False.
I could obviously have one boolean field for each weekday. However, it
occurs to me it would be neater to store all the data as one byte
whereby each bit would represent one weekday e.g.
Bit number: 1 0 1 0 1 0 0
Weekday: M T W T F S S
Status: Y N Y N Y N N
This would give us:
-SSFTWTM
Base2: 00010101
Base10: 21
If I pull the byte back from the database I can easily work with it but
I want to know if there are any bit level operations I can carry out
using standard Access SQL. e.g. to know if a record is valid for a
Monday I need to know that the first bit = 1.
Is this possible? And also, is it really worth it or should I just go
with separate fields (certainly that would be easier for reading the
database directly)?
Thanks for any advice.
Tiptop