SQL Substring

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to right a query that goes against
2 tables (tA, and tB), using a link between them. No problem, so far...the
fields that I am using to join from need to be substring in order to match.
tA Field1 = 123456ABCDE
tB Field3 = 789101ABCDE

I was trying...
Select
Substring(tA FROM 12 FOR 8)..

flying blind, any help is greatly appreciated.
 
Are you trying to say that the columns match on the last 5 characters? If so
you could try something along the lines of
FROM ta INNER JOIN tb ON Right(ta.Field1) = Right(tb.field3)

Hope This Helps
Gerald Stanley MCSD
 
Back
Top