Solved

set rowcount using subquerys

Posted on 2004-04-20
2
4,139 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

29 Experts available now in Live!

Get 1:1 Help Now