Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
NHibernate version: 1.2.?
Full stack trace of any exception that occurs:
bei NHibernate.Hql.Classic.QueryTranslator.Compile() in C:\Programme\NHibernate\src\src\NHibernate\Hql\Classic\QueryTranslator.cs:Zeile 306.
bei NHibernate.Hql.Classic.QueryTranslator.Compile(IDictionary replacements, Boolean scalar) in C:\Programme\NHibernate\src\src\NHibernate\Hql\Classic\QueryTranslator.cs:Zeile 259.
bei NHibernate.Impl.SessionFactoryImpl.GetQuery(String queryString, Boolean shallow, IDictionary enabledFilters) in C:\Programme\NHibernate\src\src\NHibernate\Impl\SessionFactoryImpl.cs:Zeile 520.
bei NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar) in C:\Programme\NHibernate\src\src\NHibernate\Impl\SessionImpl.cs:Zeile 1786.
bei NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters, IList results) in C:\Programme\NHibernate\src\src\NHibernate\Impl\SessionImpl.cs:Zeile 1753.
bei NHibernate.Impl.QueryImpl.List(IList results) in C:\Programme\NHibernate\src\src\NHibernate\Impl\QueryImpl.cs:Zeile 71.
bei TestApp.Data.Persistency.GetMachineAssignmentData(String costCenter) in \\ejot-net.com\dfs\bgh_hld_home\BEDV20\Visual Studio 2005\Projects\TestApp\TestApp.Data\Persistency.vb:Zeile 1260.
bei Service.GetMachineAssignData() in http://server/TestApp/App_Code/Service.vb:Zeile 140.
Name and version of the database you are using: Oracle 10g
Hello,
I'd like to execute the following hql:
select distinct ag.Allgemein.Projektstand.Id, sum(lg.Gesamtlos / 1000000), sum(lg.Gesamtlos / (ag.Leistung * 60 * 12)) from Arbeitsgang ag, Losgroesse lg
where lg.Allgemein = ag.Allgemein
and ag.Leistung > 0
and ag.Allgemein.Projektstand.Beschreibung not in ('A', 'B')
and (ag.Allgemein.Projektstand.Beschreibung not like 'C' or ag.Allgemein.Ausgangsdatum > :d1)
and ag.Kostenstelle = :ks
group by ag.Allgemein.Projektstand.Id
But I get an Exception:
NHibernate.QueryException - ( expected before ) in select [
(see above)]
I think the problem are the braces in this part in the select-statement:
(ag.Leistung * 60 * 12)
I need this braces, otherwise the result is wrong.
How can I solve this problem?
Thanks in advanced.