SQL Server 2005: Subquery in EXEC ?
- by BahaiResearch.com
EXEC [dbo].[pr_cfgAddFact]
@SettingName = 'TransferBatch',
@RoleFK = SELECT TOP 1 rolepk FROM cfgRole WHERE cfgRole.Name = 'SuperAdmin'
Why would SQL complain about the SELECT clause here? I am trying to run the proc with the sub query getting the data.