anypoint studio数据库问题用于表达

时间:2014-09-19 18:34:55

标签: mule mule-studio

当我使用此查询时,它在mule中的anypoint studio中工作正常。但是现在在Anypoint工作室它说它已经被弃用了,所以我使用了下面给出的新的db details config,但是它给出了下面给出的错误消息以及新的查询细节。

<jdbc-ee:outbound-endpoint exchange-pattern="one-way" queryKey="syncdb" queryTimeout="-1" connector-ref="auth-quickbooks_companies" doc:name="Database">
     <jdbc-ee:query key="syncdb" value="MERGE INTO SIAS_ACCESS dest USING(SELECT '${companyName}' ACCT_SYSTEM_COMPANY_NAME, 
       #[message.payload.accessToken] access_token, #[message.payload.accessTokenSecret]  
       access_token_secret,#[message.payload.realmId] ACCT_SYSTEM_COMPANY_ID FROM dual ) 
       src ON( dest.ACCT_SYSTEM_COMPANY_ID = src.ACCT_SYSTEM_COMPANY_ID ) 
       WHEN MATCHED THEN UPDATE SET dest.access_token = src.access_token, 
       dest.access_token_secret = src.access_token_secret, dest.ACCT_SYSTEM_COMPANY_NAME = src.ACCT_SYSTEM_COMPANY_NAME,
       ACCESS_TOKEN_LIFETIME = SYSDATE
       WHEN NOT MATCHED THEN 
       INSERT( ACCESS_ID, ACCT_SYSTEM_COMPANY_NAME, ACCESS_TOKEN, ACCESS_TOKEN_SECRET, ACCT_SYSTEM_COMPANY_ID, ACCESS_TOKEN_LIFETIME) VALUES( SIAS_ACCESS_SEQ.nextval, src.ACCT_SYSTEM_COMPANY_NAME, src.access_token, src.access_token_secret, src.ACCT_SYSTEM_COMPANY_ID, SYSDATE )"/>
</jdbc-ee:outbound-endpoint>

新数据库查询:使用Operation as Execute DDL

<db:execute-ddl config-ref="Oracle_Configuration" doc:name="Database">
<db:dynamic-query><![CDATA[MERGE INTO SIAS_ACCESS dest USING(SELECT '${companyName}' ACCT_SYSTEM_COMPANY_NAME, 
    #[message.payload.accessToken] access_token, #[message.payload.accessTokenSecret]  
    access_token_secret,#[message.payload.realmId] ACCT_SYSTEM_COMPANY_ID FROM dual ) 
    src ON( dest.ACCT_SYSTEM_COMPANY_ID = src.ACCT_SYSTEM_COMPANY_ID ) 
    WHEN MATCHED THEN UPDATE SET dest.access_token = src.access_token, 
    dest.access_token_secret = src.access_token_secret, dest.ACCT_SYSTEM_COMPANY_NAME = src.ACCT_SYSTEM_COMPANY_NAME,
    ACCESS_TOKEN_LIFETIME = SYSDATE
    WHEN NOT MATCHED THEN 
    INSERT( ACCESS_ID, ACCT_SYSTEM_COMPANY_NAME, access_token, access_token_secret, ACCT_SYSTEM_COMPANY_ID, ACCESS_TOKEN_LIFETIME) VALUES( SIAS_ACCESS_SEQ.nextval, src.ACCT_SYSTEM_COMPANY_NAME, src.access_token, src.access_token_secret, src.ACCT_SYSTEM_COMPANY_ID, SYSDATE )]]></db:dynamic-query>
 </db:execute-ddl>

错误:

Root Exception stack trace:
java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long    
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)

而不是操作 DDL我选择了插入(尝试选择/更新),查询类型参数化,它给出了我的错误:

Query type must me '[INSERT, STORE_PROCEDURE_CALL]' but was 'DDL'