Delete Partial Values of a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a field on my table used to hold addresses. However, during the
upload, both address, city, state, and zip got uploaded into the same field.

Is there any way to delete everything but the address.

Example: 123 bird lane, houston, tx, 77478

They are seperated by commas, so i want to just keep the 123 bird lane, and
delete everything else. Problem is every address is different lengths, and i
do not know how to just keep the everything prior to the first comma
separator.

please help.

Thank you in advance.
 
You need to use the Instr Function and the Left function. Probably you need to
do this after the import with an update query.

UPDATE YourImportedTable
SET YourField = LEFT(YourField,Instr(1,YourField,",")-1)
WHERE YourField Like "*,*"
 
Back
Top