单例查询 Teradata 中列名显示不正确
我正在构建一个单例查询,它应该从查询中返回预定义的数据。这个想法是 Name
、Company
、Department
是列名称。
WITH
singleton AS
(
SELECT 1 AS x
)
(
SELECT 'Name','Company','Department' FROM singleton UNION
SELECT 'A','b','c' FROM singleton UNION
SELECT 'D','e','f' FROM singleton
)
但是,会出现以下问题:
- 列名前后带有
'
。 - 列名称作为值重复(我不想要它们)
I am building a singleton query, which is supposed to return predefined data from the query. The idea is that Name
, Company
, Department
are column names.
WITH
singleton AS
(
SELECT 1 AS x
)
(
SELECT 'Name','Company','Department' FROM singleton UNION
SELECT 'A','b','c' FROM singleton UNION
SELECT 'D','e','f' FROM singleton
)
However, the following issues occur:
- The column names are with a
'
in front and in the back. - The column names are repeated as values (and I do not want them)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论