Guest User

Untitled

a guest
Aug 6th, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. How to exclude Cross apply to make it conditional
  2. S.ID IN(SELECT DISTINCT ServiceEntryID
  3. FROM
  4. ServiceEntryPart M
  5. CROSS APPLY
  6. dbo.SplitStrings_Moden(M.ServiceTypeIDs, N',') M2
  7. JOIN dbo.SplitStrings_Moden(@ServiceTypes, N',') P ON M2.Item = P.Item
  8. INNER JOIN Part ON M.PartID = Part.ID
  9. WHERE
  10. @ActivePart is null or @ActivePart = Part.Active))
Advertisement
Add Comment
Please, Sign In to add comment