Skip to main content

[archive] AcuODBC v 6.2

  • December 17, 2007
  • 5 replies
  • 0 views

[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

5 replies

[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
I believe that the SUBSTRING function will only work against Alpha-Numeric fields when using AcuODBC.

[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
I believe that the SUBSTRING function will only work against Alpha-Numeric fields when using AcuODBC.

[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
Thanks I'll verify that my field is alpha.

[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
Thanks I'll verify that my field is alpha.

[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
Thanks I'll verify that my field is alpha.