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
 General SQL Server Forums
 New to SQL Server Programming
 execute and insert

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-03-17 : 23:00:00
can we execute and insert into a table?

execute [..].[storeProcA] '2013-01-01','2013-01-10'
insert into tableA

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2013-03-18 : 00:43:26
Yes. Put insert first though like in this example

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82388



elsasoft.org
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-03-18 : 01:40:42

INSERT INTO tableA
execute Servername.DBName.SchemaName.[storeProcA] '2013-01-01','2013-01-10'

Here source and target servers are different, then create linked server for source and target servers...
Then follow the above syntax


--
Chandu
Go to Top of Page
   

- Advertisement -