Putting multiple fields into one field

L

Larry Wade

I am taking data from an Excel spreadsheet and moving it into Access. The
Excel spreadsheet has several fields that don't match up with my Access
database. In my Access database I have text field called Notes. I would
like to take several fields in the spreadsheet and put them all in this
Notes field (separated by commas or a Return). After I import the
spreadsheet into a table in Access, can I use some kind of Update Query to
do this combining of fields?
 
C

Chaim

Import into a table in Access just exactly as is. This is only a temporary
table.

Assuming the fields that you want to concatenate are all text, you can then
write a Make Table query to copy columns from this table into your final
destination table and concatenate the fields as needed. Alternatively, since
you've already created the table as you want it, you could do an insert into
action query that would look like:

insert into YourFinalTable (field1, field2, field3, ..., fieldn)
select field1, field2, field3, ..., fieldn & ", " & fieldn1 & ", " & fieldn2
....
from YourTemporaryTable

Just concatenate the fields you want into a field using the '&' syntax.

Good Luck! Hope that's clear enough.
 
A

Allan Murphy

Larry

I would import your Excel spreadsheet into a raw data table e.g.
tbl_raw_data then use an append query to append the raw data to the correct
fields in your required table. At the same time I would append the several
fields to your notes field. In your query have a column NOTES:([field1]&" "
&[field2] & " " & rest of the fields) now in the append to row select Notes
from your required table.
 
Top