![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
ASP/SQL Server Express 05 I have two tables, A and B. I would like to insert multiple records into both form A and B, but a field in form B is the Record ID in form A. So, I need to insert the records into A, collect the ID and then insert into B. I have no problem doing this for individual records; I am not sure what the best way to this is for multiple records being inserted at the same time. How would you accomplish this if you were me? Any help would be appreciated tremendously. |
#3
| |||
| |||
|
|
ASP/SQL Server Express 05 I have two tables, A and B. I would like to insert multiple records into both form A and B, but a field in form B is the Record ID in form A. So, I need to insert the records into A, collect the ID and then insert into B. I have no problem doing this for individual records; I am not sure what the best way to this is for multiple records being inserted at the same time. How would you accomplish this if you were me? |
#4
| ||||
| ||||
|
|
I have two tables, A and B. |
|
I would like to insert multiple records [sic:rows are not records] into both form A [what is a form? It is not an SQL term!] and B, but a field [sic:fields are not columns] in form B is the Record ID [sic: RDBMS uses keys, not exposed physical record locators] in form A. |
|
So, I need to insert the records into A, collect the ID and then insert into B. I have no problem doing this for individual records; I am not sure what the best way to this is for multiple records being inserted at the same time. |
|
How would you accomplish this if you were me? Any help would be appreciated tremendously. |
#5
| |||
| |||
|
|
So, I need to insert the records into A, collect the ID and then insert into B. I have no problem doing this for individual records; I am not sure what the best way to this is for multiple records being inserted at the same time. What do you mean "collect the ID"? In a relational DB, the key is a subset of the attributes of the entity, an inherent part of it and not something you let the hardware create when you insert a row. Next, a table, which is nothing like a file; it is the set of one and only one kind of entity. Thus having the same data in two tables is a violation of basic RDBMS design -- redundancy is to be avoided via Normal Forms and other design methods. |
![]() |
| Thread Tools | |
| Display Modes | |
| |