2014-01-17 244 views
0
Select a.stmt_date,a.*,b.* from ES_CC_STATEMENTS a left outer join ES_STMT_TRANSACTIONS 
b on a.stmt_id = b.stmt_id 
where a.stmt_cc_number = #cc_number AND (stmt_date >= CONVERT(DATETIME, #dateFrom , 
101)) AND (stmt_date < CONVERT(DATETIME, #dateTo , 101)) order by b.txn_date desc 

我有,当我部署项目&跑商服务器&插入输入参数,我是 得到下面的错误写在JDeveloper DB-适配器此查询&有BUIL业务服务 OSB11g:无效的列名称txn_date“

The invocation resulted in an error: Invoke JCA outbound service failed with 
application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: 
oracle.tip.adapter.sa.api.JCABindingException: 
oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: 
servicebus:/WSDL/OSB%20DB%20Adapter/adapter/Jdev_OSB_DBAdapter/test_es_cc_STMT_new [ test_es_cc_STMT_new_ptt::test_es_cc_STMT_new(test_es_cc_STMT_newInput_msg,test_es_cc_STMT_n 
ewOutputCollection) ] - WSIF JCA Execute of operation 'test_es_cc_STMT_new' failed due 
to: Pure SQL Exception. 

Pure SQL Execute of Select a.stmt_date,a.*,b.* from ES_CC_STATEMENTS a left outer join 
ES_STMT_TRANSACTIONS b on a.stmt_id = b.stmt_id where a.stmt_cc_number = ? AND 
(a.stmt_date >= CONVERT(DATETIME, ? , 101)) AND (a.stmt_date < CONVERT(DATETIME, ? , 
101)) order by b.txn_date desc failed. 

Caused by com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 
'txn_date'.. 
; nested exception is: 
BINDING.JCA-11633 
Pure SQL Exception. 
Pure SQL Execute of Select a.stmt_date,a.*,b.* from ES_CC_STATEMENTS a left outer join 
ES_STMT_TRANSACTIONS b on a.stmt_id = b.stmt_id where a.stmt_cc_number = ? AND 
(a.stmt_date >= CONVERT(DATETIME, ? , 101)) AND (a.stmt_date < CONVERT(DATETIME, ? , 
101)) order by b.txn_date desc failed. 

Caused by com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 
'txn_date'.. 
The Pure SQL option is for border use cases only and provides simple yet minimal 
functionality. Possibly try the "Perform an operation on a table" option instead. This 
exception is considered not retriable, likely due to a modelling mistake. To classify 
it as retriable instead add property nonRetriableErrorCodes with value "-207" to your 
deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set 
these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, 
and jca.retry.backoff. All properties are integers. 

回答

0

它看起来像列txn_date不表ES_STMT_TRANSACTIONS存在。

如果您提供了您的模式,将会更容易地发现问题所在。

+0

txn_date列是,可以在表ES_STMT_TRANSACTIONS – user3198223

+0

USE [信息] GO /******对象:表[DBO] [ES_STMT_TRANSACTIONS] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo]。[ES_STMT_TRANSACTIONS]( \t [TXN_ID] [数字](18,0)NOT NULL, \t [TXN_CREATED_ON] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXN_TRANSACTION_TYPE] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXN_FLAG_DEBIT_CREDIT] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXN_POSTING_DATE] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, – user3198223

+0

[TXN_DESCRIPTION] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXN_AMOUNT] [ varchar](max)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXT_CURRENCY_CODE] [varchar ](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [TXN_FOREIGN_TRANSACTION] [VARCHAR](最大)COLLATE SQL_Latin1_General_CP1_CI_AS NULL, \t [STMT_ID] [数字](18,0)NULL, – user3198223