Sort Default is a problem 
Author Message
 Sort Default is a problem

Help.....
I'm trying to retrieve rows from a Sybase table in the order that they were
inserted.
The only parameters I have are Tablename and ColumnName.
E.G.

select columnname from tablename

Because of default ordering, the values are returned in columnname order.
What I want is the columnname values to be returned in the order that they were
inserted. I'm not allowed to add a counter field to the table which would make my
life easy. And there's no default index that I can use in a WHERE.

The reason I need this is, to be able to retrieve the last value for the specified
name that was inserted.

In 'INFORMIX' I could theoretically use:

select columnname from tablename
where tablename.rowid = (select max(rowid) from tablename)

Someone please help 'coz my ass is on the line....



Mon, 02 Mar 1998 03:00:00 GMT
 Sort Default is a problem

Help.....
I'm trying to retrieve rows from a Sybase table in the order that they were
inserted.
The only parameters I have are Tablename and ColumnName.
E.G.

select columnname from tablename

Because of default ordering, the values are returned in columnname order.
What I want is the columnname values to be returned in the order that they were
inserted. I'm not allowed to add a counter field to the table which would make my
life easy. And there's no default index that I can use in a WHERE.

The reason I need this is, to be able to retrieve the last value for the specified
name that was inserted.

In 'INFORMIX' I could theoretically use:

select columnname from tablename
where tablename.rowid = (select max(rowid) from tablename)

Someone please help 'coz my ass is on the line....



Mon, 02 Mar 1998 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Default Date as 12:00 AM

2. I am not able to Sort ADO Hierarchical record set data

3. Sorting problem RS.SORT !!!

4. Default sql sort/store order

5. Dynamic Sorting (with Default Order By)

6. Default Sort on Installation...

7. Default Sort order id = 32

8. Chaning default sort order of install

9. Rebuilding Master is not changing Default Sort Order ID

10. default sort order of sql 7

11. Change default sort order.

12. Rebuilding Master DB is not changing Default Sort Order ID


 
Powered by phpBB® Forum Software