A Microsoft Office (Excel, Word) forum. OfficeFrustration

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. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update Query



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 04:44 PM
Leif
external usenet poster
 
Posts: n/a
Default Update Query

I'm trying to move information from a table to a set of
normalized tables. To do this I'm trying to use an
append query.

The destination tables has one main table, 2 other tables
that have a 1 to many relationship with the main table,
and another table that is many to many.

I've found that if I set a query the joins the main table
with one of the 1-M tables the updates to those two
tables work. However, if I change the query (the target
of the append query) to include the main table and 2 1-M
tables, the query then becomes "not updatable".

I can write a program to do the work, but I'm just
wondering if there is a SQL query solution to the problem.

Thanks,
Leif
  #2  
Old May 26th, 2004, 08:25 PM
Henk van Boeijen
external usenet poster
 
Posts: n/a
Default Update Query

Do all tables involved have primary keys, including the 'many to many'
table? If not, that is probably the cause of your problem.



"Leif" schreef in
:

I'm trying to move information from a table to a set of
normalized tables. To do this I'm trying to use an
append query.

The destination tables has one main table, 2 other tables
that have a 1 to many relationship with the main table,
and another table that is many to many.

I've found that if I set a query the joins the main table
with one of the 1-M tables the updates to those two
tables work. However, if I change the query (the target
of the append query) to include the main table and 2 1-M
tables, the query then becomes "not updatable".

I can write a program to do the work, but I'm just
wondering if there is a SQL query solution to the problem.

Thanks,
Leif


  #3  
Old May 26th, 2004, 10:19 PM
Leif
external usenet poster
 
Posts: n/a
Default Update Query


-----Original Message-----
Do all tables involved have primary keys, including

the 'many to many'
table? If not, that is probably the cause of your

problem.


Yes, all tables have a primary key (PK). The main table
has a PK called ProjectNo. The two 1-M tables have a
composite PK using the parent key plus an additional
field (which is an autonumber field for uniqueness).

The Many to Many table has an intersect table that
contains the PK of the main table and the PK of the other
table.

Leif



"Leif" schreef in
:

I'm trying to move information from a table to a set

of
normalized tables. To do this I'm trying to use an
append query.

The destination tables has one main table, 2 other

tables
that have a 1 to many relationship with the main

table,
and another table that is many to many.

I've found that if I set a query the joins the main

table
with one of the 1-M tables the updates to those two
tables work. However, if I change the query (the

target
of the append query) to include the main table and 2 1-

M
tables, the query then becomes "not updatable".

I can write a program to do the work, but I'm just
wondering if there is a SQL query solution to the

problem.

Thanks,
Leif


.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.