+ Reply to Thread
Results 1 to 7 of 7

MS QUERY in Excel - problem with joining tables (SQL)

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    MS QUERY in Excel - problem with joining tables (SQL)

    Hi People,

    (If this is not good place to post this topic - please Administrator to move it to suitable section.)

    do you use MS Query to join tables in Excel ?

    If this is not good place to post this topic - please Administrator to move it to suitable section.

    I have problem connected with that.
    In attachment there is example Excel workbook.

    I have to sheets with tables:
    START
    and Result.

    I want to left join these tables (from Start and Result)
    on fields "Numer spółki" and "Zleceniodawca_nr" in MS Query.
    Where i am converting data to numbers or text in tables within these columns - left join is working very good.

    But when I am trying to do it within MS QUERY i can't write suitable SQL to join it.
    There is an error (i can try translate it to english):

    Bez*tytu?u.jpg

    "Columns "Numer spółki" and "Zleceniodawca_nr" are different types. Join them anyway? "

    How should i write SQL in MS QUERY in order to do it ?
    Can you help me?

    Bez*tytu?u.jpg

    I have tried to use Clng function but this is not working...

    Thank you in advance,
    Łukasz Jarych
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    Have you tried converting both fields using VAL()?
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    No i didnt. Thank you.

    How can i do it ?

    Jacek Antek

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    Please Login or Register  to view this content.
    Or something along those lines.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    thank You for your help!

    This is working!:

    Please Login or Register  to view this content.
    There is other problem.
    I am trying to merge mail on word and when i am give this query for word - word is seing it as numbers, for my form i need see text.
    Is there any SQL functions to convert it for TEXT?

    example.jpg

    Jacek

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    Use STR() instead of VAL()

  7. #7
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: MS QUERY in Excel - problem with joining tables (SQL)

    I have used this and this is working !

    Great!

    Thank You !

    Jacek Antek

+ 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. [SOLVED] Query problem in access to link two tables
    By sohel_for in forum Access Tables & Databases
    Replies: 2
    Last Post: 12-12-2015, 09:58 PM
  2. Replies: 2
    Last Post: 07-19-2015, 06:04 PM
  3. Joining two tables
    By ruizeu in forum Excel General
    Replies: 0
    Last Post: 04-18-2012, 11:35 AM
  4. Joining Tables
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2012, 04:59 AM
  5. Max value joining three tables with criteria
    By jbrinkley0826 in forum Access Tables & Databases
    Replies: 0
    Last Post: 05-20-2011, 09:44 PM
  6. [SOLVED] joining two tables
    By Jan Mannoury in forum Excel General
    Replies: 4
    Last Post: 03-23-2006, 06:00 AM
  7. [SOLVED] Query Tables (excel odbc) memory problem
    By Gregory in forum Excel General
    Replies: 0
    Last Post: 09-20-2005, 12: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