View Full Version : Update and Append queries trying to alter millions more records than i have


steallan
04-12-2005, 03:56 AM
Hi

Not sure what im doing wrong her. I've a Append query to add 189 rows of data to the data already in a table of about 6000 rows. when i click preview the query says it is going to alter over 1million records!! there aren't that many records in the table,

i aslo have a simple update query to change where 110 apearss in a field over 6000 rows to a zero, the preview says it wants to change 300000+ records.

they do try to alter all these records if i run them, it repeats the 6000 odd rows of data enough times to reach the number of records it thinks needs altering

anyone have any idea about what is causing this?

thx

KenHigg
04-12-2005, 04:00 AM
You must have overlooked something regarding the relationships you have set up...

steallan
04-12-2005, 04:03 AM
well lets take the update query

im trying to update a field with no relationships set up on it, and all the query does is chage every occurance of 110 to a 0. 6000 records about 3000 of them have a 110 in that field. it wants to alter 386333 records.

??

KenHigg
04-12-2005, 04:16 AM
What about the underlying table? Does it have any relationships on any of its flds?

steallan
04-12-2005, 04:24 AM
I redid the query using the wizard to do the start bit then edited it in design view and it works.

Ill try the same for the append query,

thanks for the replies

maxmangion
04-12-2005, 05:14 AM
by any chance in the query window did you place other tables/queries which you did not use ... because that might produce you a cartesian product, hence all those millions of records.