Microsoft
Software
Hardware
Network
Question : Display records from two tables, one table missing records
I am using
- MSAccess
- Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
- FrontPage 2002
I have 2 tables: tblGeneral and tblStaff. Both have a common field ChartID.
tblGeneral is the key table in that it has ALL possible ChartIDs. tblStaff is incomplete (does not include all ChartIDs). I am trying to display fields from both tables and want to include all ChartIDs in tblGeneral even if there is no corresponding data in tblStaff.
The results only display records where there are matching ChartID records in both tblGeneral and tblStaff:
My sql statement is:
sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State, tblGeneral.VISNID, " & _
"tblStaff.LibManTitle, tblStaff.MLS " & _
"FROM tblGeneral INNER JOIN tblStaff ON tblGeneral.ChartID= tblStaff.ChartID "
Answer : Display records from two tables, one table missing records
sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State, tblGeneral.VISNID, " & _
"tblStaff.LibManTitle, tblStaff.MLS " & _
"FROM tblGeneral LEFT JOIN tblStaff ON tblGeneral.ChartID= tblStaff.ChartID "
Random Solutions
How do I pause a running program in VBA
How do I hide the Start button and keep a black screen until after a startup program launches
Detect an application instance.
Access query
SBS 2008 Best Practice analyser warning - User account does not show in the Windows SBS Console
Is there a way to create links in MS Word that link to other word documents in the same folder?
How to create a command (union) from 2 databases?
hibernate still needs power?
Drupal Beginner - need to add images to posts and stories
How to Transfer AD from 2003 to 2008 with same name