RE: [PHP-WIN] SQL to select a set of records
| From: | Herhuth, Ron | Date: | Fri, 06 Feb 2004 17:05:25 +0000 |
| Subject: | RE: [PHP-WIN] SQL to select a set of records | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22751@lists.php.net to get a copy of this message | ||
It doesn't matter neither one works...they only bring back the first x
number of records.
Ron
>From: David Felton
>To: Stuart
>Sent: 02/06/2004 11:24 AM
>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: [PHP-WIN] 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.
>**********************************************************************
>
>
>