![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Do you know how I can achieve the results I want? |
|
Is the timestamp a waste of time? |
#3
| |||
| |||
|
|
Do you know how I can achieve the results I want? |
|
Is the timestamp a waste of time? |
#4
| |||
| |||
|
|
Yes, I know the timestamp isn't a date or time thing, but I didn't know whether say the integer value of this timestamp is actually an ever increasing value so that the higher the number the more up-to-date it is. Something along these lines, purely so that I can sort them by some method to get the latest to the top of the list. |
#5
| |||
| |||
|
|
Hi All I know an SQL Server timestamp seems to be as useful as rocking horse for show jumping, but I'm hoping you know a 'fudge' to get me round a problem or at least confirm that it isn't possible. I have 2 tables, one called ACCOUNTS and one called STOCK. These tables have the usual ints, varchars, etc and have a timestamp field as well. My end user wants to see a simple list of the details in these tables (individually - no joins present here), but sorted from most recently updated to never touched. As the timestamp seems to update each time a transaction hits it I though this would be perfect, but I've had the following mixed results: 1) I did a simple ORDER BY TIMESTAMP DESC, but because the order is alphanumeric I don't get a true 'recent to old' list. 2) So I did ORDER BY CAST(TIMESTAMP AS INT) DESC. There is a numeric sort now, but the timestamp values seem to be hit and miss so that an account that I know should be near the top is around about the middle. Do you know how I can achieve the results I want? Is the timestamp a waste of time? Thanks Robbie |
#6
| |||
| |||
|
|
My end user wants to see a simple list of the details in these tables (individually - no joins present here), but sorted from most recently updated to never touched. As the timestamp seems to update each time a transaction hits it I though this would be perfect, but I've had the following mixed results: 1) I did a simple ORDER BY TIMESTAMP DESC, but because the order is alphanumeric I don't get a true 'recent to old' list. 2) So I did ORDER BY CAST(TIMESTAMP AS INT) DESC. There is a numeric sort now, but the timestamp values seem to be hit and miss so that an account that I know should be near the top is around about the middle. |
![]() |
| Thread Tools | |
| Display Modes | |
| |