Pattern matching in Sparse lookup
Posted: Wed Jul 06, 2016 5:23 am
Hi.
I am trying to do a SPARSE lookup from a reference table(SQL Server, accessed by ODBC Connector stage) and the actual lookup logic is given below:
The column SRC_CD is coming from the stream link and the record count in the stream is 1.
But datastage throws me the following warning whenever I use the SUBSTRING function.
The job ABORTS totally.
Any advises will be of great help.
Thanks.
Kumarjit.
I am trying to do a SPARSE lookup from a reference table(SQL Server, accessed by ODBC Connector stage) and the actual lookup logic is given below:
Code: Select all
SELECT COUNT(1) AS TESTCNT FROM TEST WHERE SUBSTRING(TEST_ID,1,6)=orchestrate.SRC_CD
But datastage throws me the following warning whenever I use the SUBSTRING function.
I tried to remove the SUBSTRING function in the query to the following but to no avail.Unable to determine association between statement parameters and table columns. The connector will not be able to obtain external schema and only limited schema reconciliation will be performed
Code: Select all
SELECT COUNT(1) AS TESTCNT FROM TEST WHERE TEST_ID LIKE 'orchestrate.SRC_CD%'
Any advises will be of great help.
Thanks.
Kumarjit.