如何在 SSIS 包中的 SQL 代码下方进行转换,因为我试图在 Extra Derived Column 中使用相同的 SQL 代码,但在这里我遇到了错误。
SQL 代码:
REVERSE(SUBSTRING(REVERSE ([MeasureName]),PATINDEX('% %',REVERSE ([MeasureName])),50))
Please suggest me
Error Msg:
------------------------------
Error at DRIVE [Extra Derived Columns [1567]]: Parsing the expression "REVERSE(SUBSTRING(REVERSE ([MeasureName]),PATINDEX('% %',REVERSE ([MeasureName])),50))" failed. The single quotation mark at line number "1", character number "52", was not expected.
Error at DRIVE [Extra Derived Columns [1567]]: Cannot parse the expression "REVERSE(SUBSTRING(REVERSE ([MeasureName]),PATINDEX('% %',REVERSE ([MeasureName])),50))". The expression was not valid, or there is an out-of-memory error.
Error at DRIVE [Extra Derived Columns [1567]]: The expression "REVERSE(SUBSTRING(REVERSE ([MeasureName]),PATINDEX('% %',REVERSE ([MeasureName])),50))" on "output column "Derived Column 1" (2025)" is not valid.
Error at DRIVE [Extra Derived Columns [1567]]: Failed to set property "Expression" on "output column "Derived Column 1" (2025)".
------------------------------
ADDITIONAL INFORMATION:
Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)
谢谢