Re: "LIMIT" problem MSSQL

From: Date: Fri, 21 Feb 2003 02:25:06 +0000
Subject: Re: "LIMIT" problem MSSQL
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-25810@lists.php.net to get a copy of this message
Also, since Sybase ASE uses a lot of the same T-SQL constructs, you can attempt some methods located here: http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12 -- Matt "Noam Giladi" <noam@i-com-it.com> wrote in message news:20030219161830.19219.qmail@pb1.pair.com... > a solution offered i received from "raydan > > Untested: > Untested: > declare @num int > set @num = 20 > > EXEC ('select top 10 from myTable > where ID not in (select top ' + @num + ' from myTable order by ID) > order by ID') > > But beware the dangers of dynamic SQL.

« previous php.db (#25810) next »