I am using Access to connect to an SQL server using linked tables. The Yes/No values are apparently stored numerically. I was under the impression that we would merely need to determine which is which and translate or use a lookup table. However, I am curious about why I am experiencing the following behavior. In SQL, if you enter Yes as the criteria for any of these flag fields, it finds data. If you use the numeric code Yes apparently corresponds to (looked it up in the UI of our system), it also works, but returns fewer rows. Below are some examples. Please let me know if you are aware of anything that would explain and provide insight into this.
Code:
SELECT dbo_hcc_program.cr_ipcdataentry, dbo_hcc_program.cr_ipcreview
FROM dbo_hcc_program
WHERE (((dbo_hcc_program.cr_ipcdataentry)=Yes));
Returns 1181 rows, still displays numeric value in same field. Note, the Yes value is not text “Yes”, but Boolean true/false.
If you run the same query with the numeric value for “Yes” in our system:
Code:
SELECT dbo_hcc_program.cr_ipcdataentry, dbo_hcc_program.cr_ipcreview
FROM dbo_hcc_program
WHERE (((dbo_hcc_program.cr_ipcdataentry)=315910001));
Returns 1015 rows
Please let us know if you have any knowledge about this phenomenon. A cursory search on the web is not turning up anything specific. It is as if the value Yes is being interpreted as a number, but the results are not 1:1.
Thanks,