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

DELETE END OF STRING 1

Status
Not open for further replies.

100dtl

Programmer
Aug 18, 2003
313
GB
What can delete the end of theis string for me??

or sku like '*4505' or sku =


I need

or sku =


taking off
 
Based on that EXACT String:

Code:
cStr = "or sku like '*4505' or sku ="
cStr = Left(InStrRev(cStr, "'" + 1))

That should leave you with "or sku like '*4505'"

--Rob
 
Didnt work,.. thisiis my typical string

update products set boxnumber = 'BX602701' where sku= '3000000003' or sku like '*0003' or sku ='3000000034' or sku like '*0034' or sku ='3000000095' or sku like '*0095' or sku ='3000000095' or sku like '*0095' or sku ='3000000272' or sku like '*0272' or sku ='3000000288' or sku like '*0288' or sku ='3000000289' or sku like '*0289' or sku ='3000000951' or sku like '*0951' or sku ='3000000980' or sku like '*0980' or sku ='3000003019' or sku like '*3019' or sku ='3000003139' or sku like '*3139' or sku ='3000003892' or sku like '*3892' or sku ='3000004352' or sku like '*4352' or sku ='3000004505' or sku like '*4505' or sku


I want to trim the end off
 
This fixed it

sql = Left(sql,len(sql) - 8)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top