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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

join with like operator?

Status
Not open for further replies.

dessie1981

Programmer
May 9, 2006
116
GB
Hi Everyone,

Im currently designing an online store and i have a table for special offers called "specialoffer", it has only one field called part_no

I need to link this with my other table "products" which has several fields one of them being obvioulsy "part_no".

The problem is that the txt file that the special offers come in on does not have the full part number on them, they are missing the last 3 digits on them which are generally only a country code and not really used in practice but some suppliers use them. namely our main supplier that populates 99% of my db.

So instead of using a select like i normally would ......e.g.

select * from products, specialoffer where specialoffer.part_no ="11223" and products.part_no = specialoffer.part_no;

(the normal part_no in the products table would be for example something like 112233#abu)

Now is there anyway instead of "products.pard_no = specialoffer.part_no"
Have
"products.pard_no like specialoffer.part_no"
somehow

Hope this all makes sense,

Any help would be greatfull

Des

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top