Jan 13, 2004 #1 rchandr3 Programmer Joined Jun 16, 2003 Messages 244 Location 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 Joined Feb 14, 2002 Messages 758 Location 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 Joined Feb 2, 2000 Messages 932 Location 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 Joined Jun 26, 2003 Messages 17 Location 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 #5 solofeng Programmer Joined Mar 9, 2004 Messages 3 Location CN I agree to mjuell Upvote 0 Downvote
Mar 9, 2004 Thread starter #6 rchandr3 Programmer Joined Jun 16, 2003 Messages 244 Location 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