| Author |
Topic |
|
craigh999
Starting Member
10 Posts |
Posted - 2004-07-23 : 04:22:54
|
| HiI have an exisitng access database, and want to completetley reverse the records i.e. record 1 in record last position. Is there an easy way of doing this without having to write a query to one by one from the end then turn it back into the table hence givign me what i want?Sorry if that is confusing?!?!?!Many Thanks |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-23 : 04:53:31
|
| ORDER BY MyColumn DESCENDING ??Kristen |
 |
|
|
craigh999
Starting Member
10 Posts |
Posted - 2004-07-23 : 05:10:14
|
| I think you miss my point, the db gets passed to a machine for production so i sctually need to physically reverse the record positions i.e. the first record has to be the last oneMany Thanks |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-07-23 : 05:46:04
|
| it'll help if you can give us sample data to 'enlighten' us....your original description is too vague for strangers to conjure up the problem without something tanglible to hold onto. |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2004-07-23 : 05:47:02
|
| What do you mean?Show us an example.-------Moo. :) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-23 : 06:02:53
|
| Is there such a thing as physical order in Access then? I'm used to databases storing the records in whatever order they see fit and only giving them to me in a "repeatable" order if I use an ORDER BYKristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-23 : 10:08:55
|
| No order of data in a database, even access, is meaningless...ok except oracle....but even then, when the data is reorganized, I believe it is still meaning less...Actually worse then that if you decide to store Oracle Rids as a pointer....Brett8-) |
 |
|
|
craigh999
Starting Member
10 Posts |
Posted - 2004-07-23 : 10:31:07
|
| Its ok good round it a different way, actually the order with what we are doing is paramont, the machine using it knows nothing of sql statements (i.e. Order by). What i wanted was an easy way to just swap physically all the records round. Instead gone back to the app and just used innerlist.reverse of a collection classMany Thanks Though |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-23 : 10:39:06
|
quote: Originally posted by craigh999 Its ok good round it a different way, actually the order with what we are doing is paramont, the machine using it knows nothing of sql statements (i.e. Order by). What i wanted was an easy way to just swap physically all the records round. Instead gone back to the app and just used innerlist.reverse of a collection classMany Thanks Though
Are we talking about a database or an app interface?To "order" data in a database, you would need a coulumn that signifies that...Brett8-) |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-07-23 : 11:31:11
|
quote: Originally posted by X002548 No order of data in a database, even access, is meaningless...ok except oracle....but even then, when the data is reorganized, I
What do you mean?. Data order in Oracle is also meaningless. -ec |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-23 : 12:43:22
|
| Would you store Rownum for future reference?It's only relevant to the result set of that time and place...Ok, now RowId...Would you store that? What happens when you reorg the tablespace?Brett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-23 : 12:46:16
|
| Put a clustered index on the table and use DESC. That'll reverse the order.Tara |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-07-23 : 13:11:19
|
quote: Originally posted by tduggan Put a clustered index on the table and use DESC. That'll reverse the order.Tara
I think the original question was for an access database.-ec |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-07-23 : 13:13:45
|
quote: Originally posted by X002548 Would you store Rownum for future reference?Ok, now RowId...Would you store that? What happens when you reorg the tablespace?
Rowid would definitely change. That is because ROWID actually means something, it is the physical location where your data is located. It also happens to be unique. You would never store it, or use it for an FK or something of that sort. -ec |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-23 : 13:15:02
|
quote: Originally posted by eyechart
quote: Originally posted by tduggan Put a clustered index on the table and use DESC. That'll reverse the order.Tara
I think the original question was for an access database.-ec
So Access doesn't have a clustered index option?Tara |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-07-23 : 13:16:23
|
quote: Originally posted by tdugganSo Access doesn't have a clustered index option?Tara
shows you how much I know about access! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-23 : 13:18:36
|
| Well I don't know Access either, but I assumed that it did.Tara |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-23 : 13:38:07
|
| You'll be looking for the Upsize Wizard from SQL to Access next. Dear oh dear oh dear.Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-23 : 13:43:23
|
| I'm not sure of the verbage, but the concept is definetly is...Brett8-) |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2004-07-23 : 22:52:35
|
| If you can't do a select then what about creating a new table in the access database and do a INSERT INTO newTableSELECT * FROM oldTable ORDER BY Something |
 |
|
|
|