Hi there,

sorry i have still problems by bringing a sql query in a useable ejb-ql synatax.
I had browse some ejb.ql how to but still have problems compiling my ejb-ql statement.
Could someone give me a hint?



My SQL:
select distinct(o.fk_Topic), count(a.fk_document) as num from Occurrence o,Occurrence a where o.fk_document = 752 AND o.fk_topic = a.fk_topic group by fk_topic order by num DESC LIMIT 0,10;


My EJB QL:
SELECT DISTINCT (t.topic.uniqueSequence), COUNT(o.document.uniqueSequence) as num FROM Occurrence t, Occurrence o where t.document.uniqueSequence = ?1 AND t.topic.uniqueSequence = o.topic.uniqueSequence ORDER BY num LIMIT 0,10



Thanks!!! Stefan




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to