如何将SQL Server日期格式转换为Oracle?
16lz
2021-01-22
I am working on migration of data from an old system to a new system. As part of migration, the data from the legacy system, (stored in files) is pumped into MS SQL Server. Now my app runs on Oracle. I'm having a problem with the date/timestamp.
我正在努力将数据从旧系统迁移到新系统。作为迁移的一部分,来自遗留系统的数据(存储在文件中)被泵入MS SQL Server。现在我的应用程序在Oracle上运行。我的日期/时间戳有问题。
The timestamp format in MS SQL Server data is:
MS SQL Server数据中的时间戳格式为:
2008.12.23 00:00:00
Oracle expects:
23/12/2008 00:00:00
or
23-DEC-2008 00:00:00
What would be the best way to import the data? Oracle's to_date()
function didn't work as I thought it would.
导入数据的最佳方法是什么? Oracle的to_date()函数没有像我想象的那样工作。
3 个解决方案
#1
I assume you're using insert statements?
我假设您正在使用插入语句?
Convert your dates using:
转换您的日期使用:
TO\_DATE(sql\_server\_value,'YYYY.MM.DD HH24:MI:SS')
更多相关文章
- Asp.net中Web.config连接字符串及配置数据库sqlserver .
- 数据库Mysql的学习(一)
- Mysql中插入数据并返回id插入到下一张表。
- 使用 pymysql 操作MySQL数据库
- 解决Myeclipse下Debug出现Source not found以及sql server中导入
- Intellij Mybatis连接Mysql数据库
- 使用plsql访问远程数据库
- hsqldb数据库使用
- mysql数据库自增id用法大全_MySQL