+ Reply to Thread
Results 1 to 1 of 1

Connecting to Access Database

  1. #1
    Registered User
    Join Date
    11-17-2009
    Location
    Exeter,England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Connecting to Access Database

    Hi

    I have an EXCEL 2007 workbook which has a connection to an Access 2003database query. When I run the query in Access the output that I get is different from that which appears in Excel via the link. I get the same number of records but some of the field values for some of the fields (not all of them) are different. My query is built in Access on the back of 2 other queries and refers to 4 different tables. No matter how many times I refresh the connection the data displaying in the Excel table doesn't match what I get from running the query manually in Access. Any ideas on whether there are any restrictions on the type of Queries you can run from Excel via a database connection?

    Thanks


    PS:

    The fields that hold correct data when run in Access but are incorrect when run from Excel using a connection to the database are based on the following query:

    SELECT Ebsx08.ROLE_PROFILE_CODE, Ebsx06.USER_ID, Max(Ebsx06.USER_NAME) AS MaxOfUSER_NAME, Ebsx08.ORG_CODE, Ebsx04.PARENT_ORG_ID
    FROM (Ebsx08 INNER JOIN Ebsx06 ON Ebsx08.PRACTITIONER_CODE = Ebsx06.USER_ID) INNER JOIN Ebsx04 ON Ebsx08.ORG_CODE = Ebsx04.ORG_CODE
    GROUP BY Ebsx08.ROLE_PROFILE_CODE, Ebsx06.USER_ID, Ebsx08.ORG_CODE, Ebsx04.PARENT_ORG_ID
    HAVING (((Ebsx08.ORG_CODE) Like "5*" ) AND ((Ebsx04.PARENT_ORG_ID)="Q39"))
    ORDER BY Ebsx06.USER_ID;

    The field highlighted in red is the one that doesn't display the same results when run via EXCEL.
    Last edited by toveyj; 11-25-2009 at 01:02 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1