Skip to main content
Tweeted twitter.com/#!/StackDBAs/status/519427955878285312
added 37 characters in body
Source Link
Michael Green
  • 25.1k
  • 13
  • 53
  • 98

Hello iI have a table called Workers in my database called Workers. Also iI have a stored procedure that returns a table with idId, xmlDataxml Data and XmlSchemaxml Schema by workeridWorker.Id. I want to select all workers.idWorker.Id values and execute this procedure for each Worker.idWorker.id. Here is some script:

create table #tmpXmlreturn
(
    Id int,
    Data xml,
    [Schema] xml
)

select dbo.Workers.Id as Id, 
        Exec dbo.GetBranchByWorkerId Id,
into #temptable from
dbo.Workers

If you need me to provide more information please tell itme.

Hello i have table in database called Workers. Also i have stored procedure that returns table with id, xmlData and XmlSchema by workerid. I want to select all workers.id and execute this procedure for each Worker.id. Here some script:

create table #tmpXmlreturn
(
    Id int,
    Data xml,
    [Schema] xml
)

select dbo.Workers.Id as Id, 
        Exec dbo.GetBranchByWorkerId Id,
into #temptable from
dbo.Workers

If you need me to provide more information please tell it.

Hello I have a table called Workers in my database. Also I have a stored procedure that returns a table with Id, xml Data and xml Schema by Worker.Id. I want to select all Worker.Id values and execute this procedure for each Worker.id. Here is some script:

create table #tmpXmlreturn
(
    Id int,
    Data xml,
    [Schema] xml
)

select dbo.Workers.Id as Id, 
        Exec dbo.GetBranchByWorkerId Id,
into #temptable from
dbo.Workers

If you need me to provide more information please tell me.

Source Link

Select from stored procedure

Hello i have table in database called Workers. Also i have stored procedure that returns table with id, xmlData and XmlSchema by workerid. I want to select all workers.id and execute this procedure for each Worker.id. Here some script:

create table #tmpXmlreturn
(
    Id int,
    Data xml,
    [Schema] xml
)

select dbo.Workers.Id as Id, 
        Exec dbo.GetBranchByWorkerId Id,
into #temptable from
dbo.Workers

If you need me to provide more information please tell it.