By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

Strange Query Behavior with Indexes

P: n/a

I looked at some tables for someone today who was wondering if the SiteID in
of the product and other tables was in the SiteName table.

I used some quick queries that all looked about like:

SELECT tblSiteNames.SiteID, tblSiteNames.SiteName, tblProduct.ProductID,
FROM tblProduct LEFT JOIN tblSiteNames ON tblProduct.SiteID =
WHERE ((Not (tblSiteNames.SiteID) Is Null));

When first run the query would say that there were thousands of Product
records that did not have a corresponding
SiteName records based on the site ID in both tables.

That seemed strange so I noted several of the missing SiteIDs and looked for
them in the tblSiteName . I found them.

Both fields had been set as indexes in their tables. I unset that and ran
the queries again and the queries reported no missing Site IDs

I have never seen this before. The SiteID fields are Text.

Any ideas on what causes it???


Mar 20 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.