Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql queries

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-04 : 13:54:51
Venkata suresh babu writes "SQL Query:
I have a SELECT query which returns results based on where condition. It also has joins with other tables.
The where condition is dynamic something like where field1 = @condition

Now the query returns 200 records and I want records from 20 - 30 from SQL server without using recordset in the ASP.
"Select TOP 10 * from tableName" will give me top 10 records, likewise I want records from 20 -30. any Idea..."

Jay99

468 Posts

Posted - 2002-03-04 : 14:52:15
check out
http://www.sqlteam.com/item.asp?ItemID=566
http://www.aspfaqs.com/webtech/062899-1.shtml
http://www.15seconds.com/Issue/010308.htm

Jay
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-03-04 : 14:54:55
Here is an example of what you want (I think)

select top 5 * from(
select top 15 * from authors order by au_lname desc
) a
order by au_lname asc

-Chad

Go to Top of Page
   

- Advertisement -