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
Solved

set rowcount using subquerys

Posted on 2004-04-20
2
4,156 Views
Last Modified: 2012-06-21
I have a subquery under sybase included into a select statement, an example..

select name from (select * from table1, table2, where...)

I know that using "set rowcount" I can limit rows from the main select statement, but I want to restrict rows in the inner select statement,

This is a result of migrating from sql server 2000 to sybase, please help me before I get completely crazy.
0
Comment
Question by:fgm0
2 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 500 total points
ID: 10880628
Try something like this: Sybase does not support TOP keyword.

Set Rowcount 100

select *
into #temp
from table1, table2, where...

select name from #temp

regards-
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do we check sybase license in ASE 1 2,965
upgrading Sybase from 15.7 to 16 15 4,016
Sybase Adaptive server 4 149
How to get the table names associated with a server 3 73
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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