View Full Version : split fields


kiosor
06-22-2005, 08:38 PM
I would like to split the contents of one field (in a table) into two or more. How can I do this?
e.g. 1 Coca-Cola Australia becomes 1 (in one field) and Coca-Cola Australia (in another field)

thanks :mad:

andrew93
06-23-2005, 04:09 AM
Hi
You should be able to do this by creating 2 new fields in your table and using an update query to update those fields.

In your update query, something like :
Num: Left([MyFieldName],InStr([MyFieldName]," ")-1)
will give you the number, and
Name: Right([MyFieldName],Len([MyFieldName])-InStr([MyFieldName]," "))
will give you the name.

Remember to use your actual field name in place of MyFieldName.

HTH, Andrew