cancel
Showing results for 
Search instead for 
Did you mean: 

Masking a field for a Status bit

Former Member
0 Kudos

Hi,

I have a field in MS SQL (int not null) that's used for flags. 

The value that indicates Delivery Charge is 2097152 (2^21).

How can I check this field for this value?

Also, if I'm checking for multiple flags, do I need to mask them separately, or can I mask the sum of the flag values?

Thank you,

Matt

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Matt,

Do you have more examples of what you're trying to do here?

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

The is a Customer Master table.  The only flags I've pinned down are:

4096     (2^12) - Stock Sheet Energy Surcharge

8192     (2^13) - Heavy Case Energy Surcharge

16384     (2^14) - Duty and Brokerage

2097152     (2^21) - Delivery Charge

8388608     (2^23) - Energy Surcharge

268435456     (2^28) - Fabrication Energy Surcharge

Right now, I need to report on Customers who do not have a Delivery Charge, but I want to build in flexibility.

I haven't worked with masking data since my DBIII+, but I don't know how to approach this with my SQL data.  Essentially, in my view, I'm trying to see if bit 21 (or 20) is set to 1 or 0, although they're not really bits.

Answers (0)