Last post Oct 24, 2013 07:06 AM by Happy Chen - MSFT
Oct 23, 2013 04:00 PM|jslist|LINK
I have 2 different ACCESS databases, employees & tools. Is there a way to pull fields from both databases with 1 query string?
Something like: SELECT Employee.empName, Employee.Emp#, Tool.toolID, Tool.desc Employee.Employee Inner Join Tools.ToolEmp on Employee.Employees.Emp# = Tools.ToolsEmp.Emp# Right Outer Join Tools.Tool ON Tools.ToolEmps.toolID = Tools.Tool.toolID
Each tool can have many different employees using it.
Employees db = 1 table (Employee) with these fields: empName, emp id, emp#
Tools db = 1 table (Tool) of different types of tools with these fields: toolID, tool desc, tool dept
Tools db 2nd table (ToolEmps) = toolID, emp#
Looking to get 1 dataset with a list of the employee and the tools they are assigned.
Since it's in ACCESS could I do this even though there would be different connection strings for both?
I know the SELECT statement probably isn't correct with the JOINS but could this type of thing work?
Oct 23, 2013 04:14 PM|hans_v|LINK
Inner Join Tools.ToolEmp
INNER JOIN [MS Access;DATABASE=C:\Path\To\Tool.mdb].[ToolEmp] AS ToolEmp
Oct 24, 2013 07:06 AM|Happy Chen - MSFT|LINK
hi jslist ,
I would suggest that you read this reference below:
Selecting 2 tables from 2 different databases (ACCESS)