SQL Server 2008/SSIS:Guid 写入文本文件后有括号
SELECT
Id AS VEHICLE_GUID
FROM
Vehicles WITH(NOLOCK)
结果应该是: 2343-GUID-EX-AMPLE
但改为: [2343-GUID-EX-AMPLE]
这是一个真正简单的查询,我正在使用 sql- server-2008 和 BIDS (SSIS)。当我预览结果时,没有括号。
但是,当我执行运行查询并将结果写入文本文件的任务时,当我打开文本文件时,我会看到 GUIDS 周围有括号。我很沮丧,因为我在文本文件目标上没有看到会导致此问题的属性......或者也许我忽略了某些内容?也许这可以通过查询来解决?
任何想法都将受到高度赞赏和尝试。我已经没有头发可拔了。
谢谢,
比尔
SELECT
Id AS VEHICLE_GUID
FROM
Vehicles WITH(NOLOCK)
Result should be: 2343-GUID-EX-AMPLE
But instead is: [2343-GUID-EX-AMPLE]
This is a truly simple query, I am using sql-server-2008 and BIDS (SSIS). When I preview the result, there is no brackets.
However, when I execute the task that runs the query and writes the results to the text file, when i go to open the text file i see brackets around the GUIDS. I am frustrated because I do not see a property on the text file destination that would cause this....Or maybe I am overlooking something? Maybe this can be solved from query?
Any thought would be greatly appreciated and attempted. I have no more hair to pull out.
Thanks,
Bill
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信这是您正在使用的数据类型的函数。您应该能够将其转换/转换为 varchar 并避免出现问题,或者至少然后对其运行函数以去掉括号。
I believe that is a function of the datatype you are using. You should be able to cast/convert it as varchar and avoid the problem, or at least then run functions against it to strip out the brackets.