SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS OLE DB Error - Missing right parenthesis


SSIS OLE DB Error - Missing right parenthesis

Author
Message
hogpen
hogpen
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 323
This has been driving me crazy. I'm querying an Oracle db using an OLE DB source tool connected through the Oracle Provider for OLE DB. The query works completely fine in PL/SQL and I'm able to preview the results in the OLE DB source editor but when I run the package, I get the following error:
An OLE DB error has occurred. Description: "ORA-00907: missing right parenthesis".
Get Data failed validation and returned validations status "VS_ISBROKEN"

I was able to run the package without an error before when I had ACCT_DT = PROD_DT but when I changed it to AND ACCT_DT = (PROD_DT + 1-EXTRACT(DAY FROM prod_dt)) I keep getting the error. So I'm guessing it has to do with that but I'm definitely not missing a parenthesis and it runs fine directly using PL/SQL.


Here's a simplified version of the query:
SELECT
FEE_TYPE_CD
,SUM(AppliedVolume) AS AppliedVolume

FROM (
SELECT TRIM(FEE_TYPE_CD) AS FEE_TYPE_CD
,SUM(APPLIED_VOL) AS AppliedVolume
FROM QRMTIPS.QPOST_SETTLE_FEE
WHERE TO_CHAR(PROD_DT, 'YYYY') >= '2010'
AND ACCT_DT = (PROD_DT + 1-EXTRACT(DAY FROM prod_dt))
GROUP BY FEE_TYPE_CD

UNION ALL

SELECT
FEE_TYPE_CD AS FeeTypeCode
,SUM(TRANS_VOL) AS AppliedVolume

FROM QRMTIPS.QPOST_RPTS_INVOICE_DTL a
WHERE TO_CHAR(PROD_DT, 'YYYY') >= '2010'
AND PLANT_NO = 'ALL'
AND ACCT_DT = (PROD_DT + 1-EXTRACT(DAY FROM prod_dt))
GROUP BY FEE_TYPE_CD
)
GROUP BY FEE_TYPE_CD
ORDER BY FEE_TYPE_CD


Please help! Any suggestions?
hogpen
hogpen
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 323
Nevermind, I had --acct_dt = prod_dt commented out in the statement, which runs in PL/SQL but not SSIS.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search