gpt4 book ai didi

azure - 如何在 U-SQL 连接中使用 OR 逻辑运算符?

转载 作者:行者123 更新时间:2023-12-02 07:27:56 25 4
gpt4 key购买 nike

AND ((Glt.LineNumber == Pct.LineNumber) OR (Glt_1.LineNumber == Pct.UniqueKey_Num));

我想在 U-SQL 中实现上述条件,但 Azure 不支持。我怎样才能做到这一点?

最佳答案

U-SQL 支持 OR SQL 语法(请参见下面的简单示例)。您遇到特定错误吗?

简单重现:

@inputA = 
SELECT *
FROM (
VALUES
( (int)1 ),
( (int)2 ),
( (int)3 )
) AS x ( LineNumber );


@inputB =
SELECT *
FROM (
VALUES
( (int)3, (int)3 ),
( (int)4, (int)4 ),
( (int)5, (int)5 )
) AS x ( LineNumber, UniqueKey_Num );



@output =
SELECT Glt. *
FROM @inputA AS Glt
INNER JOIN
@inputA AS Glt_1
ON Glt.LineNumber == Glt_1.LineNumber
INNER JOIN
@inputB AS Pct
ON Glt.LineNumber == UniqueKey_Num
WHERE 1 == 1
AND ((Glt.LineNumber == Pct.LineNumber) OR (Glt_1.LineNumber == Pct.UniqueKey_Num));


OUTPUT @output TO "/output/output.csv"
USING Outputters.Csv();

关于azure - 如何在 U-SQL 连接中使用 OR 逻辑运算符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48076676/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com