I Use VS 2012 Ultimate, EF 5.0 Code First, Firebird Provider 3.0.2.0

When I use the following LINQ query

 

public IQueryable<SalesTotalCount> ZDepartmentSalesPeriod

        {

            get

            {

                return (from r in ReceiptRepository.NoTracking()

                        where r.RECEIPTDATE >= ReportEndDate &

                              r.RECEIPTDATE <= ReportEndDate

                        from l in r.RECEIPTLINEs

                        let department =

                            l.ITEMSTYLE != null

                                ? l.ITEMSTYLE.ITEM.CATEGORY.DEPARTMENT

                                : l.RECEIPTITEMs.FirstOrDefault().DEPARTMENT

                        group l by department

                            into receiptLines

                            select new SalesTotalCount

                                {

                                    Name = receiptLines.Key.DEPARTMENTNAME,

                                    Total = (double)receiptLines.Sum(l =>

 
l.QUANTITY * l.PRICE -

 
(l.RECEIPTDISCOUNTs.Any()

                                                                           ?
l.RECEIPTDISCOUNTs.Sum(d => d.DISCOUNT)

                                                                           :
0)),

                                    Count = receiptLines.Count(),

                                    Listed = receiptLines.Key.LISTED

                                });

            }

        }

 

Firebird is throwing this exception

 

SQL error code = -104

Token unknown - line 35, column 4

OUTER ---&amp;gt; Dynamic SQL Error

SQL error code = -104

Token unknown - line 35, column 4

OUTER

   at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior
behavior)

   at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavio
r behavior)

   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)

   at
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(Entity
Command entityCommand, CommandBehavior
behavior)</ExceptionString><InnerException><ExceptionType>FirebirdSql.Data.C
ommon.IscException, FirebirdSql.Data.FirebirdClient, Version=3.0.2.0,
Culture=neutral,
PublicKeyToken=3750abcc3150b00c</ExceptionType><Message>Dynamic SQL Error

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to