通过链接服务器插入日期时间 [英] Insert date via linked server strips time

查看:95
本文介绍了通过链接服务器插入日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我通过SQL Server 2008中的链接服务器填充Oracle表,除了日期类型oracle列之外一切正常,我通过GetDate()表单SQL Server



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

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





但是当我查看Oracle表中的值时,它显示了





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

13-OCT-16





我需要什么用2016-10-13 10:02:03.573或Oracle等价物来填充Oracle专栏吗?



我尝试了什么:



以上所有和谷歌搜索 - 大量饮酒和诅咒



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

推荐答案

直接检查Oracle数据:Oracle DATE列支持SQL DATETIME值 - GETDATE()返回 - 因此有些东西正在剥离时间组件。最有可能的是,它是您用来从Oracle DB读取值的软件,但您需要缩小数据被丢弃的确切位置。可能有一些东西将值格式化为字符串以进行演示并将其剥离,但您需要确定。
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.


这篇关于通过链接服务器插入日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆