SQL Server and Access with different data

Leesha
BronzeLounger
Posts: 1488
Joined: 05 Feb 2010, 22:25

SQL Server and Access with different data

Post by Leesha »

Hi,
I have a database that is linked to sql server 2005 tables. The access queries are running fine. However, when I run a query to look at the same data using sql server 2005, the data related to time doesn't show up. I can see it if I open the tables directly, I can see it in the Access query, but it doesn't show in sql query. The sql server query is being used for data on the internet so I do need to use it.

I'm not sure what to look at first.

Thanks,
Leesha

User avatar
geedeearr
StarLounger
Posts: 52
Joined: 04 Feb 2010, 17:14
Location: Brookings, South Dakota

Re: SQL Sever and Access with different data

Post by geedeearr »

Hi Leesha,
Would you please post the sql of both queries?
Thanks.
gary

Those who dance are considered insane by those who can't hear the music. - George Carlin                    Image

Mark L
3StarLounger
Posts: 331
Joined: 11 Feb 2010, 03:55
Location: Land O Lakes, FL

Re: SQL Server and Access with different data

Post by Mark L »

Leesha wrote:Hi,
I have a database that is linked to sql server 2005 tables. The access queries are running fine. However, when I run a query to look at the same data using sql server 2005, the data related to time doesn't show up. I can see it if I open the tables directly, I can see it in the Access query, but it doesn't show in sql query. The sql server query is being used for data on the internet so I do need to use it.

I'm not sure what to look at first.

Thanks,
Leesha
I don't know how much experience you have running a View from within SQL Server, so I don't know whether or not you realize that there are some major syntax differences between SQL statements there vs. Access. For example:
    Access: OrderDate <= #03/11/10#
    SQL:     OrderDate <= '03/11/10'
Mark Liquorman
Land O Lakes, FL
see my website http://www.liquorman.net for Access Tips and Tricks, and for my Liquorman Utilities.

Leesha
BronzeLounger
Posts: 1488
Joined: 05 Feb 2010, 22:25

Re: SQL Server and Access with different data

Post by Leesha »

Hi,

The access sql is as follows:
SELECT dbo_tblTimeSheet.TimeSheetID, dbo_tblTimeSheet.EmployeeName, dbo_tblTimeSheet.KeyCode, dbo_tblTimeSheet.Date, dbo_tblTimeSheet.StartTime, dbo_tblTimeSheet.EndTime, dbo_tblTimeSheet.TownDistrict, dbo_tblTimeSheet.WeekEndingDate, dbo_tblTimeSheet.StudentName, dbo_tblTimeSheet.Closed
FROM dbo_tblTimeSheet



The sql server sql is:

SELECT TimeSheetID, EmployeeName, KeyCode, Date, StartTime, EndTime, TownDistrict, WeekEndingDate, TimeSheetComments, StudentName FROM tblTimeSheet

PatriciaW
NewLounger
Posts: 3
Joined: 26 Jan 2010, 22:50

Re: SQL Server and Access with different data

Post by PatriciaW »

Leesha -- I don't see any WHERE clause, so -- just not sure, but is it the "Closed" field that you are missing? because it is not being called for in the sql server sql. ??
Pat