473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Repeater DataBinding - moving the Data forward

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.
Apr 1 '06 #1
3 952
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.

Apr 1 '06 #2
What is your target database? Some of them support "start at" keyword.

Eliyahu

"musosdev" <mu*******@community.nospam> wrote in message
news:61**********************************@microsof t.com...
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.

Apr 2 '06 #3
Thanks - sorted!

"ca**********@gmail.com" wrote:
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.

Apr 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hendrik.vanniekerk | last post by:
Hi I'm using a repeater control doing databinding to an array at runtime. I have created a Template class for creating Headertemplate Itemtemplate etc. creating databinding at runtime. It...
1
by: Dobedani | last post by:
Dear All, I would like to use a Repeater to show data - mostly large volumes from a database - in a comma delimited format. VS.NET documentation mentions this as one of the uses of the Repeater!...
0
by: Michael | last post by:
I've seen several posts relating to this problem, and tried EnableViewState="False", but it does not work for me. A twist in my problem is that I am adding the templates for the repeater...
8
by: darrel | last post by:
*sigh*...I've asked this before, but have long forgotten the answer. In the past, I'd often use repeater controls, bind data to it, and then reference the data fields from within the repeater: ...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
2
by: sck10 | last post by:
Hello, I am calling a stored procedure to populate a Repeater Control. What I need to do is see if a name is in the list and if not, add it to the Repeater. Is there a way to reset the...
1
by: Dave | last post by:
I have the following ASP.NET 2.0 code (simplified here for ease): <asp:Repeater id="SearchResultsRepeater" runat="server"> <ItemTemplate> <uc:SearchResult ID="SearchResult"...
7
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
4
by: adiel_g | last post by:
I am trying to loop through a repeater to retrieve a dataitem field but am getting a NullReferenceException. I can find a checkbox control but cannot find a dataitem field. Here is the code that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.