combine multiple fields that contain similar data in Access

G

Guest

I built a table use several fields with similar date; ex name 1, name 2; I
have lots of records in each field; how do I move the data from field Name 2
to Name 1 Field
 
R

Rick B

Not sure exactly what you are asking. To move data from field 2 to field 1,
you'd use an update query. You don't explain what will happen with the data
already in field1 though. Will you simply overwrite it?

What are these fields used for? Typically, you should not have a table with
Xxxx1 Xxxx2 Xxxx3, etc. This is typically handled with two tables and a
one-to-many relationship.

If this is LastName and FirstName, I'd suggest naming the fields that. I
would NOT suggest combining them into one field.

More details please.
 
V

Vincent Johns

Rick said:
Not sure exactly what you are asking. To move data from field 2 to field 1,
you'd use an update query. You don't explain what will happen with the data
already in field1 though. Will you simply overwrite it?

What are these fields used for? Typically, you should not have a table with
Xxxx1 Xxxx2 Xxxx3, etc. This is typically handled with two tables and a
one-to-many relationship.

If this is LastName and FirstName, I'd suggest naming the fields that. I
would NOT suggest combining them into one field.

More details please.

I agree with Rick B, but it's not obvious if you want to use an Update
Query (to change the values of fields within a record) or an Append
Query (to add new records in which [field 1] will have the value that
[field 2] has now).

Assuming you want to append records, let me add that if the combined
field, [field 1], is to contain data with the same format but different
meanings, then you'll need to have some way to distinguish them. For
example, some of the values might begin with a letter, others with an
underline character. (You can have your Append Query insert the
underline, or whatever, automatically.) Or you might add another field
to each record that identifies which kind of datum is in your new
combined field, if it's not obvious in some other way. (The Append
Query can do that, too, at the same time.)

If, as Rick B. suggests, you are thinking of combining "Mary" and
"Smith" into "Mary Smith", don't do it -- you can always combine them,
almost effortlessly, whenever you need to, by using a Query. Splitting
them apart is often much trickier, and probably not something you want
to have to do.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top