Find substring that includes the second dash, plus one character

  • ok, getting weird here.

    I need to join on this column:
    AUTO_VALUE
    5S4T-12A522-A

    But the field with the join value is the Prod_ID in another table. That PROD is like:
    5S4T-12A522-AB or 5S4T-12A522-ACD, etc.

    I am unclear on how to write the ON statement....
    Select*
    From Table_A A
    InnerJoin Table _B B
    On A.AUTO_Value = B.?????

    thoughts please? thanks

  • Select *
    FROM Table_A A
    JOIN Table _B B
    On B.Prod_ID LIKE A.AUTO_Value+'%'

  • Thanks!  i won't forget that one!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply