Jan 13, 2004 #1 rchandr3 Programmer Jun 16, 2003 244 US Hi Is there a way in which I retrieve the top N records from Sybase DB? Thanks a lot,,,,
Jan 15, 2004 #2 dickiebird Programmer Feb 14, 2002 758 GB ....Like in MS SQL Server ? No - I don't think there is. Dickie Bird (-))) Upvote 0 Downvote
Jan 16, 2004 2 #3 grega Programmer Feb 2, 2000 932 GB You can do a Code: set rowcount n before running the query. So Code: set rowcount 500 select * from table will return the first 500 rows. Greg. Upvote 0 Downvote
You can do a Code: set rowcount n before running the query. So Code: set rowcount 500 select * from table will return the first 500 rows. Greg.
Mar 4, 2004 #4 mjuell Programmer Jun 26, 2003 17 NO If you want the top10 prices from a table ie.. u can use set rowcount10 select price from table order by price desc Upvote 0 Downvote
If you want the top10 prices from a table ie.. u can use set rowcount10 select price from table order by price desc
Mar 9, 2004 Thread starter #6 rchandr3 Programmer Jun 16, 2003 244 US Thats wonderful grega! A Star for you. Thanks a lot..... Thanks to mjuell and all who tried Cheers, Ravi Upvote 0 Downvote
Thats wonderful grega! A Star for you. Thanks a lot..... Thanks to mjuell and all who tried Cheers, Ravi