Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    5

    Unanswered: INNER JOIN but with datatype conversion ??

    I have a query, joining 2 tables. I am attempting to link across columns [Sales].[sales ref] and [vehicle.sales ref]
    However, [Sales].[sales ref] is integer datatype and the other text.

    Does anyone know how I can force a conversion in the INNER JOIN ?
    I have tried CAST/CONVERT/STR but no results...

    Thanx
    frustrated with Access user!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    do it at the table level instead?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by TrackerTeam
    I have a query, joining 2 tables. I am attempting to link across columns [Sales].[sales ref] and [vehicle.sales ref]
    However, [Sales].[sales ref] is integer datatype and the other text.

    Does anyone know how I can force a conversion in the INNER JOIN ?
    I have tried CAST/CONVERT/STR but no results...

    Thanx
    frustrated with Access user!
    Well ... ASSUMING that [vehicle.sales ref] contains ONLY numeric data ...

    SELECT ... FROM ... INNER JOIN ... ON [Sales].[sales ref]=CInt([vehicle.sales ref]) ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Aug 2004
    Posts
    5

    Just about there !

    Hi M Owen
    Sadly, there isn't just numeric data in the "text" field.. but seeing your suggestion of using Cint reminded me of the Cstr function. This seems to have helped. Thanx for pointing me in the right direction.

Posting Permissions

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