Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Milliseconds get rounded - datetime from Oracle

Author  Topic 

sujith_dba
Starting Member

8 Posts

Posted - 2005-11-22 : 06:56:31
I have an application which transfers data from oracle to MS SQL Server 2000. Its very time critical and rounding at the millisecond of the datetime column creates hawak. Milliseconds get rounded when inserting into MS SQL Database and when I transfer this data to another MSSQL Server database again rounding happens at the milliseconds level.

For instance:

Actual data in the Oracle view :

CREATIONDATE : 2005-11-08 00:16:38.0
MODIFIEDDATETIME: 2005-11-08 00:16:38.488

After inserting these values into MS SQL Server 2000 table:

CREATIONDATE : 2005-11-08 00:16:38.013
MODIFIEDDATETIME : 2005-11-08 00:16:38.013


After fetching above values and inserting into another MS SQL Server 2000 database table produce following:

TRANSACTIONDATETIME : 2005-11-08 00:16:38.000
RSTRIPMODIFIEDDATETIME: 2005-11-08 00:16:38.000

Please help me I need same millisecond values in both MS SQL database as I get from the oracle view.

Thank you.
SKM.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-11-22 : 07:33:46
A datetime in sql server doesn't hold values accurate o the millisecond (it's about 3 ms).
If you need it that accurate then use a chanracter field for the value - it also means you cann't use any datetime functions on it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-22 : 07:49:53
http://www.windowsitpro.com/Articles/Print.cfm?ArticleID=15574

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sujith_dba
Starting Member

8 Posts

Posted - 2005-11-22 : 10:05:35
Great to see your instant reply ...!

Lot of thanks to NR and Madhivanan for spending your precious time.

SKM
Go to Top of Page
   

- Advertisement -