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

quey with alias name not working

 
mano ranjan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
my query is "select c.order_id as ID from customer_seller_orders c";
this is my query in which iam using session.createSQLQuery(...) to exceute this query . iam getting syntax exception.can anybody tell me how to use alias name in columns of a table..

thanks
mano
 
Pavel Cherkashin
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way to make clear, your sql is correct - is to run it in SQL console (PL SQL Developer or native oracle console). The SQL query you provided look correct. Here can be another trick - you might point to inexistent table, column. The other trick can be in hibernate result mapping. Refer Hibernate SQL Queries manual to see how is correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic