Repeater DataBinding - moving the Data forward

G

Guest

Hi guys

I have a Repeater that I'm databinding to an OleDBDataReader which has the
SQL...

SELECT TOP 2 ... WHERE... ORDER BY ...

But I don't actually want the top 2.. I want the 3rd and 4th TOP results of
the result set, effective TOP 4 but then ignoring the TOP 2.

Is there any way to do this either with the databindings or the SQL ?!

Cheers, Dan.
 
C

caffienerush

SQL - Using Northwind and ordering by customerid.

select top 2 * from customers where customerid in (select top 4
customerid from customers) order by customerid desc

Note: you'll get back the 4th followed by the 3rd result.
 
E

Eliyahu Goldin

What is your target database? Some of them support "start at" keyword.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top