SuperPower
Programmer
Hi,
I'm having some problems. I'm now normalizing the database and I therefore need to write some queries to make my work easier.
I added a field named ClaimantID in my Case table. It's a foreign key, and the primary key is in the Claimants table. Now, I have ClaimNo (not uniqe) as a attribute in the Case table. This value is also in the Claimants table (I will remove it from the Case table as soon as I'm done).
I want to write a query that inserts the ClaimantID from my Claimants table into the Case table where ClaimNo is equal to the ClaimNo in the Claimant table.
To give a illustration:
Case Table:
CaseID.........ClaimantID...........ClaimNo (will remove later)
12343.............blank................UIL872-U
12344.............blank................LIO083-3-5
12345.............blank................IUL45-IU3
12346.............blank................UIL872-U
...etc.
Claimant Table:
ClaimantID............ClaimNo
1..........................UIL872-U
2..........................LIO083-3-5
3..........................IUL45-IU3
...etc.
So, now I want to write a query where I can insert the ClaimantID from the Claimants table into the appropriate recordset in the Cases table. So, CaseID 12343 should have ClaimantID 1, 12344...2, 12345....3, 12346...1, etc.
Hope someone can help me!
Geir
I'm having some problems. I'm now normalizing the database and I therefore need to write some queries to make my work easier.
I added a field named ClaimantID in my Case table. It's a foreign key, and the primary key is in the Claimants table. Now, I have ClaimNo (not uniqe) as a attribute in the Case table. This value is also in the Claimants table (I will remove it from the Case table as soon as I'm done).
I want to write a query that inserts the ClaimantID from my Claimants table into the Case table where ClaimNo is equal to the ClaimNo in the Claimant table.
To give a illustration:
Case Table:
CaseID.........ClaimantID...........ClaimNo (will remove later)
12343.............blank................UIL872-U
12344.............blank................LIO083-3-5
12345.............blank................IUL45-IU3
12346.............blank................UIL872-U
...etc.
Claimant Table:
ClaimantID............ClaimNo
1..........................UIL872-U
2..........................LIO083-3-5
3..........................IUL45-IU3
...etc.
So, now I want to write a query where I can insert the ClaimantID from the Claimants table into the appropriate recordset in the Cases table. So, CaseID 12343 should have ClaimantID 1, 12344...2, 12345....3, 12346...1, etc.
Hope someone can help me!
Geir