order by problem (merged) [message #140961] |
Thu, 06 October 2005 07:28 |
reachme_r
Messages: 8 Registered: July 2005 Location: india
|
Junior Member |
|
|
Kindly help.. urgent...
I am using a form whereby there is a master block and a corresponding detail block. I have created a relation between them.
In the back-end the table related to the detail block has a composite primary key consisting of 4 columns. Now whenever i enter data in the detail block the data gets saved in the same sequence in which i enter, at the back-end. (i viewed it using toad).
But when i try execute query on the detail block the data gets automatically sorted based on the composite primary key. And i am not using the order by clause anywhere.
I want the data to be retrieved in the same sequence that i entered which is also the same as stored in the backend.
What do i do.?
Thanking you.
|
|
|
order by problem [message #140964 is a reply to message #140961] |
Thu, 06 October 2005 07:35 |
reachme_r
Messages: 8 Registered: July 2005 Location: india
|
Junior Member |
|
|
Kindly help.. urgent...
I am using a form whereby there is a master block and a corresponding detail block. I have created a relation between them.
In the back-end the table related to the detail block has a composite primary key consisting of 4 columns. Now whenever i enter data in the detail block the data gets saved in the same sequence in which i enter, at the back-end. (i viewed it using toad).
But when i try execute query on the detail block the data gets automatically sorted based on the composite primary key. And i am not using the order by clause anywhere.
I want the data to be retrieved in the same sequence that i entered which is also the same as stored in the backend.
What do i do.?
Thanking you.
|
|
|
Re: order by problem [message #140982 is a reply to message #140964] |
Thu, 06 October 2005 08:24 |
vban2000
Messages: 207 Registered: March 2005
|
Senior Member |
|
|
you could store the sequence you entered using the value from :system.cursor_record in your table.
and at form, you can say something like order by your enter_sequence..
|
|
|
Re: order by problem [message #141083 is a reply to message #140961] |
Thu, 06 October 2005 20:30 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Add a datetime field to your record and order by that. Maybe you can order by ROWID but I can't remember whether that works are not.
You could also put a sequence number on the record and use that for sorting.
David
[Updated on: Thu, 06 October 2005 20:31] Report message to a moderator
|
|
|