title: SQL INSERT with INNER JOIN from list of constant strings
body: <p>I want to create a SQL Server 2012 Query which inserts a constant list of permission names, e.g. "ViewUsersPermission", "ModifyUsersPermission" into the table RolePermissions.</p>
  
  <p>This table has two columns: A "RoleID" which is a foreign key to the Roles table, and a varchar column "PermissionTypeName". </p>
  
  <pre><code>INSERT INTO [dbo].[RolePermissions] ([PermissionTypeName], [RoleID])
  
     SELECT 'ViewUsersPermission' AS [PermissionTypeName]
     UNION ALL
     SELECT 'ModifyUsersPermission' AS [PermissionTypeName]
     UNION ALL
     SELECT 'ViewRolesPermission' AS [PermissionTypeName]
  
     INNER JOIN   (SELECT [RoleID] FROM [dbo].[Roles]
                  WHERE [Name] = 'Administrator')
  </code></pre>
  
  <p>I am looking for a better solution. I want to specify a list of permissions types like:</p>
  
  <pre><code>SELECT FROM 'ViewUsersPermission', 'ModifyUsersPermission', 'ViewRolesPermission' 
  </code></pre>
  
  <p>instead of using the <code>UNION ALL</code> construct.</p>