我正在为 Azure 数据工厂编写存储过程,需要将日期作为字符串传递,例如:"2017 年 11 月"。
我已经尝试了以下内容,但是在这一行代码上不断收到以下错误:
WHERE FiscalMonth = @FiscalMonth;
ErRror:
此子句的表达式必须是布尔类型
法典:
DECLARE @FiscalMonth string = DateTime.Today.AddMonths(-2).ToString("MM") + "," + DateTime.Today.AddMonths(-2).ToString("yyyy");
@Input =
EXTRACT [TPID] int,
FiscalMonth string,
ProductGroup string,
[Workload Customer Age] int,
[Entitlements] int,
[Field Activations Capped] int,
[Field Activiations Uncapped] int,
[True Activations Capped] int,
[True Activations Uncapped] int,
[CappedFlag] string,
[AOM_Status_Current] string,
[AOM_Status_Historical] string
FROM @DeltaPublishOutputPath
USING Extractors.Text(delimiter : 'u0001', rowDelimiter : "r", nullEscape : "#NULL#", silent : true);
@Output =
SELECT of. *
FROM @Input AS of
WHERE FiscalMonth = @FiscalMonth;
最后我需要添加一个 doulbe = 符号。 这是更新的行。
其中财政月份 == @FiscalMonth