Hi,
I am trying to run an "Update Query".
I want to use a table I imported from Excel.
The table includes Part Numbers and related data.
I want to update my Company's database by finding those Part ID's in my table and updating all other fields with new data.
Thanks again.
Last edited by NBVC; 01-08-2009 at 10:44 AM.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Ok I think I figured out how to construct the query:
This updates all fields in the SYSADM_PART - Sandbox table with fields in the ElectricalParts where ID is the same in both tables.Code:UPDATE ElectricalParts INNER JOIN [SYSADM_PART - Sandbox] ON ElectricalParts.ID = [SYSADM_PART - Sandbox].ID SET [SYSADM_PART - Sandbox].DESCRIPTION = [ElectricalParts].[Description], [SYSADM_PART - Sandbox].STOCK_UM = [ElectricalParts].[STOCK_UM], ...(more of similar code) [SYSADM_PART - Sandbox].IS_KIT = [ElectricalParts].[IS_KIT];
When I run the query, though, it's says too many fields defined. When I click Help, it says I have more than 255 fields... but, in fact, I only have 132 fields.
Does anyone have any ideas on how to get this done?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Well I kind of partly solved it by splitting up the table... so I will Update half the fields first, then the other half after....
Now I get no errors, but it now asks me for a parameter for Description, which is the first field to update...
Why is it asking this?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I thought perhaps the square brackets where where causing the Parameter inputboxes to come up.. (like in MSQuery) but that didn't fix it either...
I crossposted this at http://www.access-programmers.co.uk/...255#post792255 since I have had no luck here and need to resolve this.
Last edited by NBVC; 01-06-2009 at 10:10 PM.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
In case anyone is interested... this one has now been solved at Access World Forums in the link in previous post.
It was a stupid thing.. the dash (-) in my table name seems to have caused the problem..even though someone in the thread tried it on his own with a dash and it worked for him...
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks