Solved

angellll

Posted on 2002-07-10
4
141 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 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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 shrink a transaction log file down to a reasonable size.

732 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