+ Reply to Thread
Results 1 to 6 of 6

Data Type mismatch error while using Like in access query

  1. #1
    Registered User
    Join Date
    05-09-2016
    Location
    uae
    MS-Off Ver
    2010
    Posts
    21

    Data Type mismatch error while using Like in access query

    Dear All

    Need your support. I am getting Data type mismatch error while using Like in access query.
    Below is my query and i have converted Final.QW and LTESITEID.LTEQW to Value by using VAL() Function to remove preceding zeros from them.



    SELECT Final.SRC_CIFAST, Final.QW, Final.Switch1, Final.Switch2, LTESITEID.LTEQW
    FROM Final, LTESITEID
    WHERE ( [Final.QW] Like [LTESITEID.LTEQW]);

  2. #2
    Registered User
    Join Date
    05-09-2016
    Location
    uae
    MS-Off Ver
    2010
    Posts
    21

    Re: Data Type mismatch error while using Like in access query

    Is there any other way to display the results where Both LTESITEID.LTEQW and Final.QW are same.

    Thanks

  3. #3
    Registered User
    Join Date
    05-09-2016
    Location
    uae
    MS-Off Ver
    2010
    Posts
    21

    Re: Data Type mismatch error while using Like in access query

    Is there any other way to display the results where Both LTESITEID.LTEQW and Final.QW are same.

    Thanks

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,057

    Re: Data Type mismatch error while using Like in access query

    Hmm, you should not be able to combine tables like that... Try:

    Please Login or Register  to view this content.
    Note that square brackets don't go around tablename.fieldname but around tablename AND around fieldname
    If syntax wasn't the reason for the issue then maybe it truly is a data type problem, but you'd have to tell me what data types Final.QW and LTESITEID.LTEQW are
    Last edited by Arkadi; 01-23-2017 at 12:19 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Registered User
    Join Date
    05-09-2016
    Location
    uae
    MS-Off Ver
    2010
    Posts
    21

    Re: Data Type mismatch error while using Like in access query

    Thanks for your support. Actually the issue was with the original excel sheet which i was using as an input.
    I changed its Column type to General and now its not showing Data Type Mismatch Error.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Data Type mismatch error while using Like in access query

    Like is not exact, you need to use a special character with it. Most DB use %
    For example
    WHERE YourName LIKE 't%';

    WHERE ( [Final.QW] Like [LTESITEID.LTEQW%]);

+ 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 result: Data type mismatch
    By puuts in forum Access Tables & Databases
    Replies: 9
    Last Post: 02-09-2015, 01:55 PM
  2. type mismatch Error when writing data to excel
    By svibuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2013, 07:07 AM
  3. Data type mismatch - excel userform to access table
    By chinaboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 08:44 AM
  4. Type Mismatch Error on Large Data Sets
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2010, 04:40 PM
  5. [SOLVED] Database Query -- Data Type Mismatch
    By StephenP in forum Excel General
    Replies: 0
    Last Post: 04-14-2005, 03:06 PM
  6. [SOLVED] MS Query of Excel Datalist -- Data type mismatch
    By StephenP in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-14-2005, 02:06 PM
  7. [SOLVED] Type Mismatch Error when getting data from another workbook
    By Tony Zappal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2005, 07:06 PM

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