Results 1 to 3 of 3

Thread: LIKE Query

  1. #1
    Join Date
    May 2008
    Posts
    4

    Unanswered: LIKE Query

    Hi everyone, I have another problem.

    My application is coded in VB6 using DAO 3.6.

    The Access DB has a table which is linked to a csv file. Consquently, some fields in the DB table have left padding on them (e.g " value")

    What I need is to be able to join this table with another.

    Example:
    Code:
    SELECT tblImport.Name, tblImport.RID, tblTruck.RID
    FROM tblImport, tblTruck
    WHERE tblTruck.RID LIKE %tblImport.RID ?????????
    Is there a correct way to do this? Or will I have to remove the padding?

    Thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
      FROM tblImport
    INNER
      JOIN tblTruck
        ON tblTruck.RID = LTrim(tblImport.RID)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    May 2008
    Posts
    4
    Thanks. Works perfectly.

Posting Permissions

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