Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 01-06-2009, 02:18 PM
NBVC's Avatar
NBVC NBVC is offline
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,518
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
Running Update Query using a Table

Please Register to Remove these Ads

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.
__________________
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 my reputation by clicking the icon next to the Post # in the bar above my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

Last edited by NBVC; 01-08-2009 at 09:44 AM.
Reply With Quote
  #2  
Old 01-06-2009, 02:48 PM
NBVC's Avatar
NBVC NBVC is offline
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,518
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
Ok I think I figured out how to construct the query:

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];
This updates all fields in the SYSADM_PART - Sandbox table with fields in the ElectricalParts where ID is the same in both tables.

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?
__________________
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 my reputation by clicking the icon next to the Post # in the bar above my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote
  #3  
Old 01-06-2009, 04:09 PM
NBVC's Avatar
NBVC NBVC is offline
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,518
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
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?
__________________
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 my reputation by clicking the icon next to the Post # in the bar above my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote
  #4  
Old 01-06-2009, 09:04 PM
NBVC's Avatar
NBVC NBVC is offline
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,518
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
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.
__________________
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 my reputation by clicking the icon next to the Post # in the bar above my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

Last edited by NBVC; 01-06-2009 at 09:10 PM.
Reply With Quote
  #5  
Old 01-08-2009, 09:44 AM
NBVC's Avatar
NBVC NBVC is offline
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,518
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
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...
__________________
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 my reputation by clicking the icon next to the Post # in the bar above my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump