| | |
Please help
Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved |
I have 2 related tables, master and a child, the master table have a primary which is an autonumber and I reference that autonumber to my child table as a foreign key so my problem is to get the value of the autonumber from a master table and write it to my child table when adding a new record to my child table, I was wandering if anyone know how to do that
Thanx in advance
Thanx in advance
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 137
it depends what you are doing at time of insert to the master table, if you are using a stored procedure you can use this
same as your other post, i would say to close the other one
MS SQL Syntax (Toggle Plain Text)
INSERT INTO mastertable ..... SELECT @@identity
same as your other post, i would say to close the other one
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: URGENT!! Need help regarding primary key!!
- Next Thread: Displaying Data
| Thread Tools | Search this Thread |
connectingtodatabaseinuse count cursor data database datepart deadlock delete_trigger highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing uniqueid update view






