SQL queries to Access 2007 DB from Excel 2007 - TechRepublic
Question
November 13, 2009 at 07:17 AM
roland.voyages

SQL queries to Access 2007 DB from Excel 2007

by roland.voyages . Updated 16 years, 7 months ago

When executing the following SQL statements from within Excel 2007, the result set ignores the “where” clause.

If the same sql statements are executed from Access 2007, the result include 192 rows. From Excel 2007 pointed to the Access 2007 data source, the result is 241. The exact difference reflects the “where” clause.

Any suggestions?

Thank you for your assistance. _/).

SELECT [tbl:Staff_Locations].Login_ID, [tbl:Staff_Locations].Full_Name, [tbl:IT_NY_HR_Staff].CC
FROM [tbl:Staff_Locations] LEFT JOIN [tbl:IT_NY_HR_Staff] ON [tbl:Staff_Locations].Login_ID = [tbl:IT_NY_HR_Staff].User_ID
WHERE ((([tbl:Staff_Locations].Login_ID) Not Like ‘tba*’ And ([tbl:Staff_Locations].Login_ID) Not Like ‘used*’))
ORDER BY [tbl:Staff_Locations].Full_Name;

This discussion is locked

All Comments