jsp参数错误

发布于 2024-10-11 04:29:05 字数 3235 浏览 0 评论 0原文

基本上我的查询是,

SELECT SEC_ORGANIZATION.description as sec_desc, FIN_COA.name as coa_name, FIN_COST_CENTRE.name as cctr_name, FIN_ANALYSIS.name as analysis_name, FIN_SUBANALYSIS.name as sub_analysis_name, FIN_COA.description as coa_desc, SEC_USER_UPDATE.login_name as update_name, CURRENCY.description as currency_desc, SEC_USER_CREATE.login_name create_name, DOCUMENT_TYPE.description as doc_desc, DOCUMENT_TYPE.name as doc_name, FIN_TRADER.description as trader_desc, AP_REC_POSTED_HDR.trans_no, AP_REC_POSTED_DTL.trans_mode, AP_REC_POSTED_DTL.document_amt as dtl_doc_amt, AP_REC_POSTED_HDR.post_frequency, AP_REC_POSTED_HDR.trans_date as hdr_trans_date, AP_REC_POSTED_HDR.rec_start_date, AP_REC_POSTED_HDR.rec_end_date, AP_REC_POSTED_HDR.document_no hdr_doc_no, AP_REC_POSTED_HDR.rec_lastgen_date, AP_REC_POSTED_HDR.rec_nextgen_date, AP_REC_POSTED_HDR.exchange_rate, AP_REC_POSTED_HDR.document_amt hdr_doc_amt, AP_REC_POSTED_HDR.base_amt hdr_base_amt, AP_REC_POSTED_DTL.base_amt as dtl_base_amt, AP_REC_POSTED_DTL.line_no, AP_REC_POSTED_HDR.organization_id, FIN_YEAR_PERIOD.fin_year, FIN_YEAR_PERIOD.acct_period, AP_REC_POSTED_HDR.remarks hdr_remarks, AP_REC_POSTED_DTL.remarks as dtl_remarks
 FROM   (((((((((((AP_REC_POSTED_HDR AP_REC_POSTED_HDR LEFT OUTER JOIN SEC_ORGANIZATION SEC_ORGANIZATION ON AP_REC_POSTED_HDR.ORGANIZATION_ID=SEC_ORGANIZATION.OBJECT_ID) 
 LEFT OUTER JOIN DOCUMENT_TYPE DOCUMENT_TYPE ON AP_REC_POSTED_HDR.DOC_TYPE_ID=DOCUMENT_TYPE.OBJECT_ID) 
 LEFT OUTER JOIN FIN_YEAR_PERIOD FIN_YEAR_PERIOD ON AP_REC_POSTED_HDR.YEAR_PERIOD_ID=FIN_YEAR_PERIOD.OBJECT_ID) 
 LEFT OUTER JOIN CURRENCY CURRENCY ON AP_REC_POSTED_HDR.CURRENCY_ID=CURRENCY.OBJECT_ID) 
 LEFT OUTER JOIN FIN_TRADER FIN_TRADER ON AP_REC_POSTED_HDR.TRADER_ID=FIN_TRADER.OBJECT_ID) 
 LEFT OUTER JOIN SEC_USER SEC_USER_CREATE ON AP_REC_POSTED_HDR.CREATED_BY=SEC_USER_CREATE.OBJECT_ID) 
 LEFT OUTER JOIN SEC_USER SEC_USER_UPDATE ON AP_REC_POSTED_HDR.UPDATED_BY=SEC_USER_UPDATE.OBJECT_ID) 
 LEFT OUTER JOIN AP_REC_POSTED_DTL AP_REC_POSTED_DTL ON AP_REC_POSTED_HDR.OBJECT_ID=AP_REC_POSTED_DTL.AP_REC_POSTED_HDR_ID) 
 LEFT OUTER JOIN FIN_COA FIN_COA ON AP_REC_POSTED_DTL.ACCT_ID=FIN_COA.OBJECT_ID) 
 LEFT OUTER JOIN FIN_COST_CENTRE FIN_COST_CENTRE ON AP_REC_POSTED_DTL.COST_CTR_ID=FIN_COST_CENTRE.OBJECT_ID) 
 LEFT OUTER JOIN FIN_ANALYSIS FIN_ANALYSIS ON AP_REC_POSTED_DTL.ANALYSIS_ID=FIN_ANALYSIS.OBJECT_ID) 
 LEFT OUTER JOIN FIN_SUBANALYSIS FIN_SUBANALYSIS ON AP_REC_POSTED_DTL.SUBANALYSIS_ID=FIN_SUBANALYSIS.OBJECT_ID
 WHERE  DOCUMENT_TYPE.NAME='PE'

一切顺利,但是当我输入时,

and ap_rec_posted_hdr.trans_no >= $P{tnoFrom}
and ap_rec_posted_hdr.trans_no <= $P{tnoTo}
and ap_rec_posted_hdr.trans_date >= to_date($P{dtTFrom},'dd-mm-yyyy')
and ap_rec_posted_hdr.trans_date <= to_date($P{dtTTo},'dd-mm-yyyy')
and ap_rec_posted_hdr.posting_date >= to_date($P{finFrom},'dd-mm-yyyy')
and ap_rec_posted_hdr.posting_date <= to_date($P{finTo},'dd-mm-yyyy')
and fin_trader.name >=$P{venFrom}
and fin_trader.name <=$P{venTo}
and sec_user_create.login_name >= $P{cFrom}
and sec_user_create.login_name <= $P{cTo}
  ORDER BY AP_REC_POSTED_HDR.TRANS_NO

它在网页上显示时返回 null 值。

basically my query was,

SELECT SEC_ORGANIZATION.description as sec_desc, FIN_COA.name as coa_name, FIN_COST_CENTRE.name as cctr_name, FIN_ANALYSIS.name as analysis_name, FIN_SUBANALYSIS.name as sub_analysis_name, FIN_COA.description as coa_desc, SEC_USER_UPDATE.login_name as update_name, CURRENCY.description as currency_desc, SEC_USER_CREATE.login_name create_name, DOCUMENT_TYPE.description as doc_desc, DOCUMENT_TYPE.name as doc_name, FIN_TRADER.description as trader_desc, AP_REC_POSTED_HDR.trans_no, AP_REC_POSTED_DTL.trans_mode, AP_REC_POSTED_DTL.document_amt as dtl_doc_amt, AP_REC_POSTED_HDR.post_frequency, AP_REC_POSTED_HDR.trans_date as hdr_trans_date, AP_REC_POSTED_HDR.rec_start_date, AP_REC_POSTED_HDR.rec_end_date, AP_REC_POSTED_HDR.document_no hdr_doc_no, AP_REC_POSTED_HDR.rec_lastgen_date, AP_REC_POSTED_HDR.rec_nextgen_date, AP_REC_POSTED_HDR.exchange_rate, AP_REC_POSTED_HDR.document_amt hdr_doc_amt, AP_REC_POSTED_HDR.base_amt hdr_base_amt, AP_REC_POSTED_DTL.base_amt as dtl_base_amt, AP_REC_POSTED_DTL.line_no, AP_REC_POSTED_HDR.organization_id, FIN_YEAR_PERIOD.fin_year, FIN_YEAR_PERIOD.acct_period, AP_REC_POSTED_HDR.remarks hdr_remarks, AP_REC_POSTED_DTL.remarks as dtl_remarks
 FROM   (((((((((((AP_REC_POSTED_HDR AP_REC_POSTED_HDR LEFT OUTER JOIN SEC_ORGANIZATION SEC_ORGANIZATION ON AP_REC_POSTED_HDR.ORGANIZATION_ID=SEC_ORGANIZATION.OBJECT_ID) 
 LEFT OUTER JOIN DOCUMENT_TYPE DOCUMENT_TYPE ON AP_REC_POSTED_HDR.DOC_TYPE_ID=DOCUMENT_TYPE.OBJECT_ID) 
 LEFT OUTER JOIN FIN_YEAR_PERIOD FIN_YEAR_PERIOD ON AP_REC_POSTED_HDR.YEAR_PERIOD_ID=FIN_YEAR_PERIOD.OBJECT_ID) 
 LEFT OUTER JOIN CURRENCY CURRENCY ON AP_REC_POSTED_HDR.CURRENCY_ID=CURRENCY.OBJECT_ID) 
 LEFT OUTER JOIN FIN_TRADER FIN_TRADER ON AP_REC_POSTED_HDR.TRADER_ID=FIN_TRADER.OBJECT_ID) 
 LEFT OUTER JOIN SEC_USER SEC_USER_CREATE ON AP_REC_POSTED_HDR.CREATED_BY=SEC_USER_CREATE.OBJECT_ID) 
 LEFT OUTER JOIN SEC_USER SEC_USER_UPDATE ON AP_REC_POSTED_HDR.UPDATED_BY=SEC_USER_UPDATE.OBJECT_ID) 
 LEFT OUTER JOIN AP_REC_POSTED_DTL AP_REC_POSTED_DTL ON AP_REC_POSTED_HDR.OBJECT_ID=AP_REC_POSTED_DTL.AP_REC_POSTED_HDR_ID) 
 LEFT OUTER JOIN FIN_COA FIN_COA ON AP_REC_POSTED_DTL.ACCT_ID=FIN_COA.OBJECT_ID) 
 LEFT OUTER JOIN FIN_COST_CENTRE FIN_COST_CENTRE ON AP_REC_POSTED_DTL.COST_CTR_ID=FIN_COST_CENTRE.OBJECT_ID) 
 LEFT OUTER JOIN FIN_ANALYSIS FIN_ANALYSIS ON AP_REC_POSTED_DTL.ANALYSIS_ID=FIN_ANALYSIS.OBJECT_ID) 
 LEFT OUTER JOIN FIN_SUBANALYSIS FIN_SUBANALYSIS ON AP_REC_POSTED_DTL.SUBANALYSIS_ID=FIN_SUBANALYSIS.OBJECT_ID
 WHERE  DOCUMENT_TYPE.NAME='PE'

Everything goes right, but when i put,

and ap_rec_posted_hdr.trans_no >= $P{tnoFrom}
and ap_rec_posted_hdr.trans_no <= $P{tnoTo}
and ap_rec_posted_hdr.trans_date >= to_date($P{dtTFrom},'dd-mm-yyyy')
and ap_rec_posted_hdr.trans_date <= to_date($P{dtTTo},'dd-mm-yyyy')
and ap_rec_posted_hdr.posting_date >= to_date($P{finFrom},'dd-mm-yyyy')
and ap_rec_posted_hdr.posting_date <= to_date($P{finTo},'dd-mm-yyyy')
and fin_trader.name >=$P{venFrom}
and fin_trader.name <=$P{venTo}
and sec_user_create.login_name >= $P{cFrom}
and sec_user_create.login_name <= $P{cTo}
  ORDER BY AP_REC_POSTED_HDR.TRANS_NO

It returns the null value when displayed on the web page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

著墨染雨君画夕 2024-10-18 04:29:05

Chi:直接对数据库运行相同的查询。使用您在报告中使用的相同值。

如果得到 null,则查询是正确的。

Chi: Run the same query directly against the database. Use the same values you used in the report.

If you get null, then the query is correct.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文