Query Not Seeing Changes to Source Tables

T

Tara Metzger

Hello, Below is another SQL statement for a "bad" query that isn't seeing the changes in the tables even when the query is re-run (using the "run" button in the Design tab). No changes have been made to the design of the query and the only changes to the source table where manually entered new data to the existing design. How can I get the query to see the additional data with out having to delete a table in the query then add it back in? Any help you can give me would be wonderful. Thank you.

SELECT tblYdstckSegSpecRelevance.SegSpecRelID AS ID, tblYardstick.ClassID AS class, tblClasses.ClassTitle AS Title, tblYdstckSegSpecRelevance.TargetAudienceID AS SegNo, tblTargetAudience.TargetAudience AS Segment, tblLocation.LocationName AS [Local], tblYdstckSegSpecRelevance.YNLNA AS [Value], tblYardstickYesNo.YNL AS YN
FROM (tblYardstickYesNo INNER JOIN ((tblYdstckSegSpecRelevance INNER JOIN tblClasses ON tblYdstckSegSpecRelevance.ClassID = tblClasses.ClassID) INNER JOIN tblTargetAudience ON tblYdstckSegSpecRelevance.TargetAudienceID = tblTargetAudience.TargetAudienceID) ON tblYardstickYesNo.ID = tblYdstckSegSpecRelevance.YNLNA) INNER JOIN (tblLocation INNER JOIN tblYardstick ON tblLocation.LocationID = tblYardstick.LocationID.Value) ON (tblYdstckSegSpecRelevance.SegSpecRelID = tblYardstick.SegSpecRelevance.Value) AND (tblClasses.ClassID = tblYardstick.ClassID);


EggHeadCafe - Software Developer Portal of Choice
The FAST TRACK to ASP.NET
http://www.eggheadcafe.com/tutorial...48-dbfb16fcdda1/the-fast-track-to-aspnet.aspx
 
J

Jerry Whittle

You have a bunch of INNER JOINs. If any of the tables in the INNER JOINs do
not have a matching record, then that record won't be returned. Try changing
one of them to LEFT JOIN and see if that helps. If not, use a RIGHT JOIN.

You may need to experiment to find where the problem is. Also it's possible
to have combinations of LEFT and RIGHT joins where Access can't deal with
them and you'll get an error message.
 
T

Tara Metzger

Jerry, thank you for getting back to me about this. Per your suggestion I double checked all the joins in the query. Access won't allow me to change any of the "important" joins to right or left with out giving me an error message. Do you have any other suggestions or ideas? I'm sure there is something I'm doing wrong and don't know it.
Thank you,
Tara



Jerry Whittle wrote:

You have a bunch of INNER JOINs.
28-Oct-09

You have a bunch of INNER JOINs. If any of the tables in the INNER JOINs d
not have a matching record, then that record will not be returned. Try changin
one of them to LEFT JOIN and see if that helps. If not, use a RIGHT JOIN

You may need to experiment to find where the problem is. Also it is possibl
to have combinations of LEFT and RIGHT joins where Access cannot deal wit
them and you will get an error message
-
Jerry Whittle, Microsoft Access MV
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder

:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
VB : Numeric to Word converter
http://www.eggheadcafe.com/tutorial...24-23ed3b456112/vb--numeric-to-word-conv.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top