SELECT
[wo#],
[COL2] as "Team"
FROM T1
union
select [request_external_wo_number], ' '
from T2
我想在tableau数据源中添加一个空白列。我有这个代码在SSMS中工作正常。但是,当我将其传输到Tableau时,它不起作用。除了''
之外还有更好的语法吗?答案 0 :(得分:0)
您也可以null
SELECT [wo#] as "col1", [COL2] as "Team"
FROM T1 UNION
SELECT [request_external_wo_number], null
FROM T2
这将在Team
表的T2
列下生成空白字段,因为您不会为 SQL添加额外开销