Click here to Skip to main content
15,303,572 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, I populate an Oracle table via a linked server in SQL Server 2008, all works fine except for a date type oracle column, I pass GetDate() form SQL Server

SQL
GetDate() returns 2016-10-13 10:02:03.573


but when I look at the values in the Oracle table it shows

SQL
13-OCT-16


what do I need to do to populate Oracle column with 2016-10-13 10:02:03.573 or the Oracle equivalent ?

What I have tried:

All of the above and Googling - drinking heavily and cursing
Posted
Updated 26-Jan-21 9:38am

Check the Oracle data directly: Oracle DATE columns support SQL DATETIME values - which GETDATE() returns - so something is stripping the time component out. Most likely, it's the software you are using to read the values from the Oracle DB, but you need to "narrow down" exactly where the data is being discarded. Probably, there is something formatting the value to a string for presentation and that is stripping it out, but you need to be sure.
   
Comments
pkfox 14-Oct-16 4:59am
   
Sorry for my tardiness - I'm viewing the inserted data in Oracle SQL Developer
Does it really matter ?
   
Comments
Richard Deeming 27-Jan-21 4:05am
   
It's starting to look like you're doing it deliberately. Even long-standing members need to be held to similar standards as new members. If a new member did this - particularly after they had already been told not to - they would have their account terminated for abuse.
pkfox 27-Jan-21 5:17am
   
I don't know what it is I'm doing wrong Richard - there seems to be some confusion between commenting and solutions - hopefully this is a comment and therefore allowed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900