Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Insert from Stored Procedure ?

Author  Topic 

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2006-02-17 : 16:08:06
Is it possible to insert records into a table from a stored procedure ?

---

Thanks!
Igor.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-02-17 : 16:10:20
Is this what you mean?

INSERT INTO Table1(Column1, Column2, ...)
EXEC dbo.StoredProc1

Or do you mean how to create a stored procedure that inserts records:

CREATE PROC dbo.StoredProc1
AS
INSERT INTO Table1(Column1, Column2) VALUES(1, 2)

Tara Kizer
aka tduggan
Go to Top of Page

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2006-02-17 : 16:34:03
This, insert into a table from a stored procedure as a query.

INSERT INTO Table1(Column1, Column2, ...)
EXEC dbo.StoredProc1

---

Thanks!
Igor.
Go to Top of Page
   

- Advertisement -