+ Reply to Thread
Results 1 to 1 of 1

Trouble with Excel query

  1. #1
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2003
    Posts
    18

    Trouble with Excel query

    Hi All,

    I'm trying to use Excel as a data source and am making the query using MS Query.
    The following query worked using SQL Server Management Studio but is not working for Excel:
    -------------------------------------------------------
    select e1.name
    ,e1.role
    ,r1.duty
    ,d1.conflict
    from emp as e1, [role] as r1, conflict as d1
    where
    e1.[role]=r1.[role] and
    r1.duty=d1.duty
    and exists (select 1
    from emp as e2, [role] as r2, conflict as d2
    where
    d2.duty=r2.duty and
    r2.[role]=e2.[role] and
    e2.name=e1.name
    and r2.role<>r1.role
    and r2.duty<>r1.duty
    and r2.duty=d1.conflict
    )
    order by e1.name

    --------------------------------------------------------

    Please advice.

    Thanks and regards !

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Trouble with Excel query

    I believe in MS Query, you must identify the file name as part of the table name names, but to be sure, suggest you upload a copy of a sanitized file that this query represents for testing. Are all tables in the same file or different files. You will need to make sure all files that contain the tables are part of the upload.

    Or you can try rebuilding the query using the MS Query Wizard in Excel. This should help get the paths squared away for you.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Trouble with Excel query

    I believe in MS Query, you must identify the file name as part of the table name names, but to be sure, suggest you upload a copy of a sanitized file that this query represents for testing. Are all tables in the same file or different files. You will need to make sure all files that contain the tables are part of the upload.

    Or you can try rebuilding the query using the MS Query Wizard in Excel. This should help get the paths squared away for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 05-14-2013, 04:39 PM
  2. Having trouble with Excel web query for data scrape
    By stevenab87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2012, 10:18 PM
  3. Trouble to import data to excel from microsoft query
    By tantcu in forum Excel General
    Replies: 0
    Last Post: 07-16-2012, 11:20 AM
  4. [SOLVED] I am having trouble with a dynamic web query
    By dwassner in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-26-2012, 10:41 PM
  5. Trouble Displaying PNG from Web Query...?
    By jsartrean in forum Excel General
    Replies: 1
    Last Post: 02-08-2007, 02:05 AM

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