Steve Davis
Philip Greenspun's Homepage : Community member
A member of the Philip Greenspun's Homepage community since January 29, 2006
If you were to log in, you'd be able to get more information on your fellow community member.
Static Page Comments
- January 29, 2006, on Dates in Oracle:
"Some Profoundly Painful Things -- Calculating time intervals between rows in a table" is very useful, thank you. Some people may need the following technique to establish a sequential numeric identifier.
(In the example you assume "user_id column, which we know to be sequential and unique")
declare @tmp (registration_date datetime)
insert @tmp
select identity(int,1,1) as Sequence, registration_date into #x
from users order by registration_date
... (now use #x instead of users in the example)
drop table #x
philg@mit.edu