Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.33 KB | None | 0 0
  1. SELECT pd.ProductionDayId
  2. FROM dbo.ProductionDays pd
  3. JOIN dbo.ProductionDayElements pde ON pde.ProductionDayId = pd.ProductionDayId
  4. JOIN dbo.frProductionScenes ps ON ps.ProductionDayElementId = pde.ProductionDayElementId
  5. JOIN dbo.ProductionSceneCastLink pscl ON pscl.SceneId = ps.SceneId
  6. WHERE pd.DayStatus <> 1 AND pscl.CastId = @CastId
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement