Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2006

Tip: Looking for answers? Try searching our database.

get all the records from LastValidTech even one of the condition dont match

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mustish1 - 29 Sep 2006 03:28 GMT
Hi: I try to print data from LastValidTech even one of the condition
Join/Where dont match. But it shows empty record.

SELECT
LastValidTech.Account1,
LastValidTech.LstVldTech,
tech_id.TECHCONT,
tech_id.CORP,
LastValidTech.ReportID
FROM LastValidTech LEFT JOIN tech_id
ON LastValidTech.LstVldTech = tech_id.TECH
WHERE (((tech_id.CORP)=Val(Left([LastValidTech].[Account1],5))))
GROUP BY
LastValidTech.Account1,
LastValidTech.LstVldTech,
tech_id.TECHCONT,
tech_id.CORP,
LastValidTech.ReportID;

Thanks.
Marshall Barton - 29 Sep 2006 05:37 GMT
>Hi: I try to print data from LastValidTech even one of the condition
>Join/Where dont match. But it shows empty record.
[quoted text clipped - 14 lines]
>tech_id.CORP,
>LastValidTech.ReportID;

I think the problem is bevause you are using a LEFT JOIN
instead of an INNER JOIN

Why are you using a GROUP BY clause?  Without an aggregate
function, the only thing it accomplishes is to prevent
duplicate output records, which the purpose of the DISTINCT
predicate.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.