473,513 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2K - update query needed

Sorry for all the questions lately (I am trying!) :)

Here's an interesting one.

I need to create 3 records on the many side of a relationship for every
record on the parent table. I'm importing some parent records and in this
case the many side will have no records so I need to fix that.

So I'm looping through the parent records, I have the PK.

I need to insert three records (I'm currently using an append query to add
the values from another table) and then fill in the null foreign key using
the parent PK.

At the moment after my append, I can't use a recordset because I've added
records without the required foreign key, so I need to do this all in one go
I think.
ta for any help

Jan 18 '06 #1
1 1203
With a few more specifics, someone might be able to suggest an approach.

How do you pick the records to copy for a record (on the "one" side) that
matches (pr provides) the foreign key?

If you'd describe what you have, and what you are trying to accomplish,
rather than how you want to implement it, we'd have more latitude in what we
might suggest.

Larry Linson
Microsoft Access MVP
"Deano" <de***@mailinator.com> wrote in message
news:43**********************@ptn-nntp-reader02.plus.net...
Sorry for all the questions lately (I am trying!) :)

Here's an interesting one.

I need to create 3 records on the many side of a relationship for every
record on the parent table. I'm importing some parent records and in this
case the many side will have no records so I need to fix that.

So I'm looping through the parent records, I have the PK.

I need to insert three records (I'm currently using an append query to add
the values from another table) and then fill in the null foreign key using
the parent PK.

At the moment after my append, I can't use a recordset because I've added
records without the required foreign key, so I need to do this all in one
go
I think.
ta for any help

Jan 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10213
by: Surendra | last post by:
I have this query that I need to use in an Update statement to populate a field in the table by the value of Sq ---------------------------------------------------------------------------- Inline...
6
2066
by: mo | last post by:
I need to bring the ssn's into UniqueSups (supervisors) from tblNonNormalized. My inherited DB is not normalized and I find it extremely irritating due to the workarounds needed. I created...
10
9804
by: Steve Jorgensen | last post by:
Hi all, Over the years, I have had to keep dealing with the same Access restriction - that you can't update a table in a statement that joins it to another non-updateable query or employs a...
7
3518
by: Mark Carlyle via AccessMonster.com | last post by:
I have this update query that I am trying to run. I know the syntax is messed up but do not know how to correct it. Select 'UPDATE', Transactions,'Set = where = ' From "Get Daily Balances" ...
5
1985
by: Dave Smithz | last post by:
Hi there, Been working on an evolving DB program for a while now. Suddenly I have come across a situation where I need to update a table based on a group by query. For example, I have a table...
5
8314
by: parwal.sandeep | last post by:
Hello grp! i'm using INNODB tables which are using frequently . if i fire a SELECT query which fetch major part of table it usually take 10-20 seconds to complete. in mean time if any UPDATE...
1
4741
by: bjgdal | last post by:
I am currently trying to create an application which will help me in my work. To do this I need to update a field called "Installations" in a table with the same value for all records. The value...
4
1426
by: dougans | last post by:
Hey there people, Need help on this one if you can spare me a second!!! No idea why, been trying for 2 hours to fix this now and I feel like a complete loser haha. Anyone have any idea why...
3
4859
by: ringer | last post by:
I am trying to add a functionality into a db I use for my checkbook that will help me plan for and save money for future large expenses. Into a table called tblFutureTransactions I want to enter...
13
4145
by: Neil | last post by:
I'm running an update query in SQL 7 from QA, and it runs forever. Has been running for 20 minutes so far! The query is quite simple: update a single field in a table, based on a join with another...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.