我正在尝试根据日期从 oracle 中进行简单的拉动。最后,我需要这个查询是动态的,因此在 ADF 中使用 @concat() 函数。为简单起见,我想在 ADF 中使用 concat 运行以下 oracle 查询。
由于 oracle 需要单引号,我试图通过使用两个单引号来转义它。
甲骨文查询:
select * from schema.customer where updated > to_date('06/25/2019','MM/DD/YYYY')
这是我的 ADF 文本:
@concat('select * from iris.iris_customer where updated > to_date(','''06/25/2019''','''MM/DD/YYYY''',');')
我使用 to_date 是因为我收到了“无效月份”错误,并认为我可以解决它。这是我得到的错误:
{ "errorCode": "2200", "message": "'Source' 端发生故障。ErrorCode=UserErrorUnclassifiedError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Odbc Operation Failed.,Source=Microsoft。 DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [22008] [Microsoft][ODBC Oracle Wire Protocol driver][Oracle]ORA-01843: not a valid month,Source= msora28.dll,'", "failureType": "UserError", "target": "copy_to_adl" }