Results 1 to 2 of 2
  1. #1
    SSharp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2008
    Posts
    6

    Type mismatch in query

    I have two tables that I need to query.
    Table 1 has the field stored as a data type is a Number (Long Integer).
    Table 2 has the field stored as a data type of Text.
    They are essentially the same field in both tables, two different developers created the data types.


    I don't have the option to change one of the data types at this time.
    Is there an easy way that I can run a simple query over these two tables using the mismatched fields as the join?

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You can force the issue in SQL view:

    FROM OneTable INNER JOIN OtherTable ON OneTable.NumericField = CLng(OtherTable.TextField)

    Or you can go the other way with CStr().
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Data type mismatch in query criteria
    By TinaCa in forum Queries
    Replies: 2
    Last Post: 09-19-2011, 11:31 PM
  2. Type Mismatch....WHY?!!?
    By jgelpi16 in forum Queries
    Replies: 9
    Last Post: 03-07-2011, 09:18 AM
  3. Type Mismatch
    By Alex Motilal in forum Programming
    Replies: 10
    Last Post: 02-13-2011, 05:42 AM
  4. Data type mismatch in query
    By thart21 in forum Queries
    Replies: 8
    Last Post: 10-01-2010, 01:40 PM
  5. Type mismatch in expression /Query
    By Brian62 in forum Queries
    Replies: 4
    Last Post: 04-22-2010, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums