SQL Server 2012失败:导入平面文件时,日期为yyyyy.m.dd格式
Help! I have tons of data already in these date formats (YYYY.M.DD), so I can't modify the data. Is there an easy fix? I'm getting conversion issues when I presently try to import the current dates as a "Date" field.
的帮助!我有大量的数据已经在这些日期格式(YYYY.M.DD),所以我不能修改数据。有简单的解决办法吗?当我当前尝试将当前日期作为“日期”字段导入时,会遇到转换问题。
I'm using Tableau as an overlay and it recognized the dates correctly, no problem. What can I do?
我用Tableau作为叠加,它能正确识别日期,没问题。我能做什么?
1 个解决方案
#1
0
You could use a programmers editor, or sed (if you have Cygwin tools installed) to do a regular expression replace on the date strings, since the pattern is quite distinctive (and all you would need to do is replace the period with dashes to do a bulk import, which is what I'm assuming you're trying to do).
您可以使用一个程序员编辑器,或sed(如果你有安装Cygwin工具)做一个正则表达式替换字符串,日期自模式很独特的(和所有你需要做的就是将时间替换为破折号批量导入,这是我假设你正在试图做的)。
Failing to do that, is there an OleDB driver for Tableau? You could import the flat files into Tableau, and then from there to SQL Server...
如果做不到这一点,表中是否有OleDB驱动程序?您可以将平面文件导入Tableau,然后从那里导入SQL Server…
更多相关文章
- TSQL - 非标准化表上的最大值或最高日期
- [置顶] sql server中对日期字段值的比较
- 一种在t-SQL中选择两个日期之间的日期的方法
- mysql 将时间戳直接转换成日期时间
- 如何将SQL Server日期格式转换为Oracle?
- 怎么样在MYSQL中把一个字符串转换成日期?
- 我如何通过日期时间PIVOT TABLE或CrossTab?
- 如何编写一个查询,在多组行中聚合具有最新日期的单行?
- 在Oracle SQL中将时间戳转换为日期