Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query throwing “Invalid column name” error.

 
Praveen Chadichal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have one small issue on the SQL query..
I am trying to execute the following query , but its throwing error saying “Invalid column name”.
QUERY:
SELECT extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID') as CustId, count(*) from APPLICATION_EVENT_INSTANCE aei
WHERE aei.ACTION_NAME =’CUSTOMER_LOGIN’
AND extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID') is not null
AND aei.EVENT_TMSTMP BETWEEN to_date(‘3/1/2009’,'mm/dd/yyyy')
AND to_date(‘5/15/2009’,'mm/dd/yyyy')
GROUP BY extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID')

The same query works well in the TOAD but when I run in eclipse its shows the following error:
ERROR:
Hibernate: SELECT extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID') as CustId, count(*) from APPLICATION_EVENT_INSTANCE aei
WHERE aei.ACTION_NAME =?
AND extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID') is not null
AND aei.EVENT_TMSTMP BETWEEN to_date(?,'mm/dd/yyyy')
AND to_date(?,'mm/dd/yyyy')
GROUP BY extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID')
0 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 17006, SQLState: null
0 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Invalid column name
0 [main] FATAL com.gfs.ebiz.rm.usage.RMUsageAggregation - Exception occured while running UsageAggreagation Process

I am using hibernate to execute queries & this query is in one of the .hbm file, What I guess is its not identifying the “extractValue(aei.EVENT_DETAIL_XML,'/RMEvent/PricingCustomerID')” as a query column, could you please help on this? Earlier help is deeply appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic