Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to join when data isn't quite equal...?

Status
Not open for further replies.

blarson0

Programmer
Jun 12, 2002
85
US
Hi! I need to have some tables join, but the fields won't be quite equal. The assy field in one table will be the full assy number, but in the other table it will only be part of it. For example:

Table 1:
Assy Num
78463-RAP-04
72400-LFW-04
78461-RAV-04
78461-RLM-04
etc...

Table 2:
Assy Num Desc
78463 Motor 1
72400 Motor 2
78461 Motor 3

so when the first parts are the same, it should join. I tried using a LIKE instead of = in the join statement, but no dice. any ideas?

Thanks!

-Brad
 
If you always want the first 5 characters join using the LEFT function.

Ken
 
Thanks Ken!

I was worried about doing that, but it is working great. Thanks again!

-Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top