Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any substitutes for MSSQL TimeStamp and GUID types in Oracle?
Hi.
We use the dbms_utility function get_time to get the current time
expressed
as an integer with a resolution of 100th/second. The value returned loops
every 30 days or so, so take the date and concatenate it to produce a
unique value. The Oracle data type INTEGER is a 38-digit integer so
you'll
have plenty of room to work with.
Hope that helps
Graham
Byron wrote:
> We are devloping a new database application using MSSQL 7.0 as the
> back end and we'd like to design the database to allow us to run
> against an Oracle database with no changes to the VB code and as few
> changes as possible to the SQL code. I've become quite fond of the
> MSSQL datatype TimeStamp for concurrency control and the GUID
> (Globally Unique IDentifier) type for keys so I don't have worry about
> duplicating values across servers.
>
> As I've discovered there are no corresponding types in Oracle. I
> think I can get around the GUID problem by creating it in VB code
> instead of SQL, and storing it as a string in Oracle, but the
> TimeStamp is another issue. I suppose I could use a Date type column
> and assume the one second granularity will be enough, but I'd rather
> have a mechanism I could use in a single column with no holes in it at
> all.
>
> I'd love to hear from anyone that has tackled either or both issues,
> or a referal to a source on information.
Received on Mon Aug 14 2000 - 09:00:23 CDT