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!

Removing data to the right of a charachter

Status
Not open for further replies.

JustATheory

IS-IT--Management
Feb 27, 2003
115
US
I'm having trouble removing some data from a record within a field. I need to remove a dash and all data to the right of it. Using a query.

Any help is well appreciated.
Thanks,
Andy
 
update yourtable
set yourfield = left(yourfield, instr(yourfield,'-')-1)
where instr(yourfield,'-') > 0;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top