Link to home
Start Free TrialLog in
Avatar of CJ_S
CJ_SFlag for Netherlands

asked on

angellll

Within the hour ;-)

CJ
Avatar of CJ_S
CJ_S
Flag of Netherlands image

ASKER

By the way. Do you know why

declare @x int
set @x = 3
select top @x * from ...

does not work? been wondering this for a couple of weeks now. :-/

CJ
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why?
Ask bill.gates@microsoft.com

SET ROWCOUNT @x
works to limit the output of the entire select, but wouldn't help in this case, as it won't affect the subquery...

CHeers

Avatar of CJ_S

ASKER

I knew about the rowcount but I wanted it to make the query more dynamic.

Anyway. Thanks again!

CJ