Remove Characters using Field Calculator

Discussion created by snowgirl62 on Dec 30, 2011
Latest reply on Jan 25, 2013 by jahood

I've had this issue in the past, and don't think I've ever come up with a great way to resolve it other than doing a manual cut/paste for each field. 

I have one field of attributes that has an address and a direction (100 S Main St - 2NW; 1343 W Kimberly Rd - 3WSE; etc) and I need to calculate just the address portion (100 S Main St; 1343 W Kimberly Rd; etc) into a new field.  I know that I can use the Left/Mid/Right functions to remove a specific number of characters from a string, but my proplem is that that number will vary.  Is there any way that I can calculate only the characters to the left of the hyphen (as all attributes have the hyphen) into a new field?  Or by the same token, remove all characters to the right of, and including, the hyphen?

Thanks in advance!