473,434 Members | 1,414 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

How to Insert records in Two Related tables using Stored Procedures

I have two tables here is the description:
Employees (E_ID(Primary key), Name, Address)
EmployeeEmails(E_ID(Foreign Key), EmailID(Primary Key), email)

I want to write a stored procedure which will insert record in Employees as well as Multiple Emails related to that perticular employee in EmployeeEmails Table....

I'll appreciate little help.
May 8 '10 #1
1 1784
Jim Doherty
897 Expert 512MB
@AsifRaja
There are lots of reference to INSERTS that exist on the web. May I suggest that you attempt to show your understanding of:-

A) Where the data is coming from and in what format in order to insert it
B) Demonstrate some coding attempt yourself as to your understanding of that process.

I am sure contributor help will be forthcoming and appreciate this input from you.

Here is an MSDN link reference for you to look at insert syntax

http://msdn.microsoft.com/en-us/libr...6(SQL.80).aspx
May 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Taras | last post by:
Hello! I have a problem. I'm using a dataset in VB.NET with multiple tables with relations between them. I would like dataset to update to all related tables with right identity, when certain...
2
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
1
by: Taras | last post by:
Hello! I have a problem. I'm using a dataset in VB.NET with multiple tables with relations between them. I would like dataset to update to all related tables with right identity, when certain...
2
by: Crazy Cat | last post by:
Using Visual Basic .NET and SQL Server 2005 I attempt to add a query that is a call to a stored procedure in the DataSet Designer. The TableAdapter Query Configuration wizard finds my stored...
2
by: Dean Slindee | last post by:
Anyone know of a location for a simple example of a web service using stored procedures to Read, Insert, Delete and Update rows in MS SQL Server? Thanks, Dean S
3
by: GaryDean | last post by:
In a new 2.0 website I am developing I am using .XSD tableadapters, building them with the wizard), and choosing the Stored Procedure option. I now notice that when I go back to change the sql...
0
by: Sirisha | last post by:
Hi, I am inserting values into databse using sqlserver stored procedures. i wrote stored preocedure,but in codebehind file(.vb file) i dont know how to pass the parameters, i got error message...
3
by: kanimozhiz | last post by:
Hi I have created the DAL component using stored procedures but I am unable to insert,update and delete the records in the Database. But retrieve is done as a whole and unable to retrieve a...
13
by: srinivas gandrath | last post by:
Hi all, I am having trouble to writing stored procedure to insert and update the 2 tables in sql server 2005. Here is my problem. I have 2 tables with following columns. TableName:BENEFIT_PDF...
3
by: simple simon | last post by:
How would I insert into multiple related tables using a table valued parameter? Is there any way to do this without using a WHILE loop? I know how to insert from a table valued parameter into one...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.