Highlighted
Absent Member.
Absent Member.
878 views

[archive] AcuODBC v 6.2

[Migrated content. Thread originally posted on 14 December 2007]

I am using ODBC to transfer vision data to a SQL data base for reporting. I have been trying to use the SUBSTRING command as a part of a WHERE clause to filter the data I need below is the query I am using

SELECT OI_ACCT, OI_PAT, OI_TRIP, OI_TYPE, OI_SEQ,
OI_STATCD, OI_TTYP, OI_TRX_TYPE,
OI_AMOUNT, OI_INS_KEY, OI_CHECK,
OI_TRX_DATE, OI_BATCH, OI_PRI_BILL_TO,
OI_USER, OI_PRI_DATE, OI_POSTED_DATE,
OI_CHG_BILL_INFO, OI_CONTRACT,
OI_REV_STAT, EST_CONTR
FROM AMOPI
INNER JOIN AMAHCHNG
ON (OI_ACCT = SUBSTRING(ACH_FILE_KEY,1,9) )
WHERE
(AHC_FILE_NAME = 'AMOPI') AND
(OI_TRX_TYPE <> 'T')

When I test the query in SQl Server it works but when I run the SSIS package to start the transfer it faild on the ACuODBC piece and I get an error saying extra token and it points to the "(" in the statement.

Is there something wron with my query or does the AcuODBC piece not support the substring statement.

Thanks in advance for any help
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] AcuODBC v 6.2

I believe that the SUBSTRING function will only work against Alpha-Numeric fields when using AcuODBC.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] AcuODBC v 6.2

Thanks I'll verify that my field is alpha.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.