Oh dwurp! (headdesking).
I was so concerned with getting the expression right that I didn't even notice I'd forgotten that.
Thanks Sergey
>You forgot to enclose expression in parenthesizes and specify column list
>
>>Ok, here's what I'm trying (I start with the simplest and add), the simplest
>>
>>
>>Declare @TB int
>>Select @TB = TypeB from ExpFrameWork where Category = '40'
>>print @TB && prints 5 - like I'd expect it to.
>>
>>Select top @TB from ExpMaster where Category = '40' and Difflet = 'B'
>>*The above has the red line under it and says Incorrect syntax near @TB. Expecting REAL, INTEGER, NUMERIC or '('
>>
>>
>>If I replace @TB with (@TB) it gives me 'Incorrect syntax near from'
>>Perhaps 'expression' isn't meaning what I think it means?
>>
>>
>>>You can use expression in top clause
>>>
>>>SELECT TOP (expression) ...
>>>
>>>
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place