By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,827 Members | 2,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,827 IT Pros & Developers. It's quick & easy.

need help with append

P: n/a
I want to extract a subset of fields from one table into another
the master table has many fields
the subset has about half, but still many.

Is there a way I can just append the master into the subsets structure and
this way only the existing fields in the destination will be filled?
That would be great, but it seems that the append query wants you to specify
the fields.
is there another way around this?
I want to do it in code and it seems the sql string will be too long.

I remember you could do this in dbase I think.

Thanks in advance
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In the Append Query you can specify which fields from the source you want to
append. Long shouldn't be a problem. Create the query in the query design
grid then change to SQL view and copy and paste into your code. You can run
the query from code by assigning the SQL to a string variable then executing
it.

Example:

CurrentDb.Execute strSQL, dbFailOnError

--
Wayne Morgan
Microsoft Access MVP
"Danny" <da********@hotmail.com> wrote in message
news:9D**********************@news4.srv.hcvlny.cv. net...
I want to extract a subset of fields from one table into another
the master table has many fields
the subset has about half, but still many.

Is there a way I can just append the master into the subsets structure and
this way only the existing fields in the destination will be filled?
That would be great, but it seems that the append query wants you to specify the fields.
is there another way around this?
I want to do it in code and it seems the sql string will be too long.

I remember you could do this in dbase I think.

Thanks in advance

Nov 12 '05 #2

P: n/a
If you have a table that contains the fields you want to append data
to(subset table). You design a query using your master table as the data
source for the query. Add (Double-click or select and drag) "only" the
fields you want to update in your subset table, to the design grid. On the
main menu select the Query/Append Query option. You'll be prompted to
select the table you want to append the data to. Select your subset data
table. If the field names of both table's are the same the names will
probably be automatically placed in the Append To row in the design grid.
If not select the field you want to append to. Run the query. Hope I
understood what you are trying to accomplish.

--
Reggie

www.smittysinet.com
----------
"Danny" <da********@hotmail.com> wrote in message
news:9D**********************@news4.srv.hcvlny.cv. net...
I want to extract a subset of fields from one table into another
the master table has many fields
the subset has about half, but still many.

Is there a way I can just append the master into the subsets structure and
this way only the existing fields in the destination will be filled?
That would be great, but it seems that the append query wants you to specify the fields.
is there another way around this?
I want to do it in code and it seems the sql string will be too long.

I remember you could do this in dbase I think.

Thanks in advance

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.