Create PROC [dbo].[SP_Planning]
AS
BEGIN
Truncate TABLE Planning
Select * into
Planning
from (select T0.ID,T1.SID,[dbo].[Planning](T1.Id,T0.SId) as Status
from BDetails T0
cross join SDetails T1)
END