Hi,
I've been asked to provide extra reports for a program that uses an MSSQL server. I have some experience with MySQL so understand a fair bit of the syntax but I'm stumped by a part of a query and would like some help understanding what the (Flags & 2) part of the query is trying to achieve.
Where CreditLimit > 0 And (Flags & 2) = 0
--And (Flags & 8) = 0
--And (Flags & 128) = 0
The Flags field is an int and allows NULLs. I'm not sure what other information is needed?
I don't have any background knowledge of the structure of this db, nor any reference for Flags intended purpose. Am I on a wild goose chase without this info?
I ran a query on just Flags so there is an idea of the data in there:
SELECT TOP 30 Flags FROM [tableinquestion] GROUP BY Flags ORDER BY Flags
Results:
-----------
NULL
0
4
5
6
7
8
9
10
12
13
14
15
72
78
128
132
133
134
135
136
138
140
141
142
143
196
198
200
202
Any ideas/suggestions?