• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA: can you use Select statement to create a column

 
Kevin Crays
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to do something like this using JPA




In a nutshell, I'm for each customer, I want to sum up the amount of money spent on each product.
I know I can do this with a straight SQL query, but using JPA I get an exception that basically says,
"Internal Exception: line 1:200: unexpected token: select"

where 200 is the location of the s in the first select encountered (though not in this example).


Is there a way to do this in JPA.

Thanks,

Kevin
 
Kevin Crays
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone have any ideas?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic