Is it possible to Exec a dsql statement and return a simple value to a local var? e.g

Set @RecCnt = Exec('Select Count(ID) from tblContacts Where FirstName=''David''')

This doesn't work, and note, I need to use DSQL here because I'm actually building up that Select statement each time.

Right now I do this:

Declare @RecCnt Int
Create Table #tmp1 ( RecCnt Int )
Insert into #tmp1 Exec('Select Count(ID) from tblContacts Where FirstName=''David''')
Select @RecCnt = RecCnt From #tmp1
Print @RecCnt
Drop table #tmp1

But, I'd rather not have to deal with the temp table.

Thanks, DaveBo