Re: Simple SQL question.

From: David Thornewill von Essen <ttg242_at_newton.sps.mot.com>
Date: Fri, 2 Jul 1993 18:39:48 GMT
Message-ID: <1993Jul2.183948.13514_at_newsgate.sps.mot.com>


In article 7rt_at_oac4.hsc.uth.tmc.edu, Shirley <shirley_at_odin.mda.uth.tmc.edu> writes:
>My question is atually an extension of Chris G. vanHasselt's question.
>Is it possible to write a SQL query so that instead of returning all
>records satisfying a where clause, it returns rows between n1... n2
>where n1 = 10 and n2 = 20.

This goes against what SQL is. A SELECT statement returns a SET of values with no especial rank, i.e. the sequence is not guaranteed. If you want only to see a certain subset you have to define this as part of the WHERE clause. It seems that you are trying to make a set oriented language (4GL) operate in a sequential (3GL) manner, which isn't in the nature of the beast.

Regards,
David TvE

---
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
David Thornewill von Essen                           Sr. Systems Analyst
Motorola ASIC Division                            I don't speak for Mot.
Chandler, AZ-85224                                   fax: (602) 814-4451
email: ttg242_at_email.sps.mot.com                      tel: (602) 814-4395
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Received on Fri Jul 02 1993 - 20:39:48 CEST

Original text of this message