[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

angellll

Posted on 2002-07-10
4
Medium Priority
?
148 Views
Last Modified: 2012-05-04
Within the hour ;-)

CJ
0
Comment
Question by:CJ_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

649 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