Suppose I have a function/procedure where I need to select the Top n rows where the value of n is based by a variable, how I do it.
For instance, the following is NOT working:
Select Top @Num MyValue
From MyTable
Where <some condition>
Any suggestions will be very helpful ...
Thanks.
For instance, the following is NOT working:
Select Top @Num MyValue
From MyTable
Where <some condition>
Any suggestions will be very helpful ...
Thanks.