This is what I am getting...
I am trying to execute a native SQL query as given below...
I am running hibernate 3.x and oracle 9.x database.
Could one of you please help, what I am doing wrong... ?
SELECT companyinf5_.NAME as impName
docket2_.DOCKET_YEAR as docketYear,
docket2_.DOCKET_SEQ as docketSeq,
docket2_.GAS_TYPE as gasType,
companyinf7_.NAME as suppName,
to_char(quarterlyt1_.ARRIVAL_DATE, 'yyyy-mm') as arrivalDate
,
sum(quarterlyt1_.VOLUME) as volume,
sum(quarterlyt1_.AVG_PRICE)/count(*) as avgPrice,
sum(quarterlyt1_.DEMAND_PRICE)/count(*) as demandPrice,
sum(quarterlyt1_.RESERVATION_FEE)/count(*) as reservationFee
FROM QRTRLY_TRANS_T quarterlyt0_,
QRTRLY_TRANS_INFO_T quarterlyt1_,
COMPANY_T company6_,
COMPANY_INFO_T companyinf7_,
POEE_T poee8_,
DOCKET_T docket2_,
DOCKET_COMPANY_T companies3_,
COMPANY_T company4_,
COMPANY_INFO_T companyinf5_
where docket2_.TERM_TYPE=:termType
and quarterlyt1_.ARRIVAL_DATE>=:startDate
and quarterlyt1_.ARRIVAL_DATE<:endDate
and quarterlyt0_.IMPORT_TRANS_ID=quarterlyt1_.ID
and quarterlyt1_.SUPPLIER_ID=company6_.ID (+)
and company6_.ID=companyinf7_.COMPANY_ID (+)
and quarterlyt1_.POEE_ID=poee8_.ID (+)
and quarterlyt0_.DOCKET_ID=docket2_.ID
and docket2_.ID=companies3_.DOCKET_ID
and companies3_.COMPANY_ID=company4_.ID
and company4_.ID=companyinf5_.COMPANY_ID
and companyinf5_.ACTIVE_IND =1
and companyinf7_.ACTIVE_IND (+) = 1
and poee8_.ID not in (314)
group by companyinf5_.NAME ,
docket2_.DOCKET_YEAR ,
docket2_.DOCKET_SEQ ,
docket2_.GAS_TYPE ,
companyinf7_.NAME ,
to_char(quarterlyt1_.ARRIVAL_DATE, 'yyyy-mm')
order by companyinf5_.NAME,
docket2_.DOCKET_YEAR,
docket2_.DOCKET_SEQ,
docket2_.GAS_TYPE,
companyinf7_.NAME,
to_char(quarterlyt1_.ARRIVAL_DATE, 'yyyy-mm')
30 Aug 20:03 WARN JDBCExceptionReporter - SQL Error: 923, SQLState: 42000
30 Aug 20:03 ERROR JDBCExceptionReporter - ORA-00923: FROM keyword not found wh
ere expected
|