Solved

angellll

Posted on 2002-07-10
4
137 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 142

Accepted Solution

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

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.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now