|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Order by timestamps with different names from 2 tables....
I am retrieving information from two tables each of which has a date field, one called WhenRedeemed, one called WhenPointsEarned, and I need to have these ordered together in chronological order as if there was only one date column - is this possible and how?
|
|
#3
|
|||
|
|||
|
Select col1,...,WhenRedeemed as ColDateTime
from tb1 union all select Col1,...,WhenPointsEarned from tb1 order by coldatetime in this way WhenRedeemed & WhenPointsEarned will be sorted together |
|
#4
|
|||
|
|||
|
Exactly what I needed - thanks
![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Order by timestamps with different names from 2 tables.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|