Solved

angellll

Posted on 2002-07-10
4
139 Views
Last Modified: 2012-05-04
Within the hour ;-)

CJ
0
Comment
Question by:CJ_S
  • 2
  • 2
4 Comments
 
LVL 22

Author Comment

by:CJ_S
ID: 7143656
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
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 7143657
Glad I could help
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7143661
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

0
 
LVL 22

Author Comment

by:CJ_S
ID: 7143680
I knew about the rowcount but I wanted it to make the query more dynamic.

Anyway. Thanks again!

CJ
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question