Need help for Insert Into Statement
I am new to Sql Server 2000.I am trying to do something but have not been able to figure out how to insert data on two different tables from one submission form.
I have created two tables t_Caller (CallerId, CallLastName, CallFirstName) and
other table called t_Complainent(ComId, CallerId, ComLastName, ComFirstName). Where CallerId is the primary key for t_Caller table and ComId is the primary key for the t_Complainent table.
For example, I have a form that asks for the following data (from users registering):
Caller's Last Name
Caller's First Name
Complainent's Last Name
Complainent's First Name
I would like to insert CallerId, Caller's Last Name and First Name into table t_Caller and ComId, CallerId (Same as t_Caller table's CallerId) Complainent's Last Name and First Name in to t_Complainent table using only one INSERT statement. I don't have any clue how to do it?
I am using SQL Server 2000 for this.
How would I insert data from one form into two tables?
Please help me asap.
Thanks for you help,
Vishal

