Record Number ...
-
Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!
-
Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!
RJS wrote: 2) Is there any similar command in sql2000 for rownum in Oracle? Select top xxx * from tablename e.g. select top 10 * from authors
-
RJS wrote: 2) Is there any similar command in sql2000 for rownum in Oracle? Select top xxx * from tablename e.g. select top 10 * from authors
That will only get the top 10 rows. You would need to use your index( if you have one) to select the rows. select * from table where index > 50 and index < 100 This assumes that the index is numberic and sequential.
-
Hi, I would like to know if it is possible to do something like these: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? So I would get only those records between the 50 and the 100.. 2) Is there any similar command in sql2000 for rownum in Oracle? Thanks a million!
RJS wrote: 1) select field1,field2 from table_name where line_number_in_table >50 and line_number_in_table < 100 in sql2000? No. You need a real column. BTW, in SQL, in general, it's a bad practice to assume a physical order of records in a query. RJS wrote: Is there any similar command in sql2000 for rownum in Oracle? No, but you can fake it. I see dumb people