• Post Reply Bookmark Topic Watch Topic
  • New Topic

quey with alias name not working  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!