Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.35 KB | None | 0 0
  1. DECLARE @BusinessTemplateID INT = 215
  2. DECLARE @SourceGroupID INT = 4772
  3.  
  4. SELECT    *
  5. FROM      tblCommunities
  6. WHERE     @SourceGroupID = [tblCommunities].[groupid]
  7.           AND ( IsDeleted = 0 OR IsDeleted IS NULL)
  8.     AND CommunityID IN (
  9.         SELECT CommunityID
  10.         FROM tblBusinessTemplateCommunity
  11.         WHERE BusinessTemplateID = @BusinessTemplateID
  12.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement