RE: SQL to select a set of records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No. What I said was correct, as Ron wanted rows 25-35.

-----Original Message-----
From: Stuart [mailto:lists@sharedserver.net]
Sent: 06 February 2004 12:45
To: David Felton
Cc: Nadim Attari; php-windows@lists.php.net; Herhuth, Ron
Subject: Re:  SQL to select a set of records


David Felton wrote:
> SELECT TOP 10 dbo.Table_MIS_Files.File_ID
> FROM		dbo.Table_MIS_Files
> WHERE     dbo.Table_MIS_Files.File_ID NOT IN 
> (SELECT TOP 25 dbo.Table_MIS_Files.File_ID
> FROM		dbo.Table_MIS_Files)

Shouldn't this be...

SELECT TOP 25 dbo.Table_MIS_Files.File_ID
FROM		dbo.Table_MIS_Files
WHERE     dbo.Table_MIS_Files.File_ID NOT IN
(SELECT TOP 10 dbo.Table_MIS_Files.File_ID
FROM		dbo.Table_MIS_Files)

That will get rows 11-25.
-- 
Stuart


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux