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.