readthefuckingmanual.net

[SOLVED] org.hibernate.hql.ast.QuerySyntaxException:unexpected token: * near line 1, column 8[select * from sample_table]

Error added: 2009-03-06T17:20:47Z

1 people waiting for the answer...

3 answers found.

Answer 898 (100.0% helpful)

HQL is not SQL. You specify objects and classes instead of columns and tables. Try something like
SELECT t FROM SampleTable t
Permalink

Answer 1460 (100.0% helpful)

If you are using CreateQuery in your DAO class, replace it with CreateSQLQuery. It should solve the problem
Permalink

Answer 1818 (100.0% helpful)

You can simply use the from Clause 

"from SampleTable"
Permalink

Add an answer/solution

If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people struggling with this too.


Please enter 61948 here

If you want to be notified via email when this is solved, enter your email address here: