2016-01-12 16:16
Vytasd
[SELECT O.ID, C.ID, C.Pavad, C.Kodas, C.SP_kodas, C.E_Mail, b.Op_data, b.Op_Dok, b.Op_turinys, O.CurrencyCode, O.CurrencyRate, O.LanguageCode, O.CommentsInternal, MAX(I.Tar), SUM(I.SumOriginal), SUM(I.SumVatOriginal), SUM(I.SumLTL), SUM(I.SumVatLTL), SUM(I.Discount), SUM(I.DiscountVat), SUM(I.DiscountLTL), SUM(I.DiscountVatLTL), O.AccountPayer, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatOriginal - I.DiscountVat ELSE 0 END) AS VirtualVat, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatLTL - I.DiscountVatLTL ELSE 0 END) AS VirtualVatLTL FROM bz b LEFT JOIN InvoicesMade O ON O.ID=b.Op_ID LEFT JOIN sfd as I ON I.SF_ID=O.ID LEFT JOIN asmenys C ON C.ID=b.Op_analitika WHERE b.Op_data>=$DF AND b.Op_data=$DF AND b.Op_data0 THEN I.SumVatOriginal - I.DiscountVat ELSE 0 END) AS VirtualVat, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatLTL - I.DiscountVatLTL ELSE 0 END) AS VirtualVatLTL FROM bz b LEFT JOIN InvoicesMade O ON O.ID=b.Op_ID LEFT JOIN sfd as I ON I.SF_ID=O.ID LEFT JOIN asmenys C ON C.ID=b.Op_analitika WHERE b.Op_data>=$DF AND b.Op_data=$DF AND b.Op_data System.Data.SQLite.SQLiteException: SQLite error
no such column: I.VatIsVirtual
at System.Data.SQLite.SQLite3.Prepare(String strSql, SQLiteStatement previous, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[=b.Op_ID LEFT JOIN sfd as I ON I.SF_ID=O.ID LEFT JOIN asmenys C ON C.ID=b.Op_analitika WHERE b.Op_data>=$DF AND b.Op_data=$DF AND b.Op_data0 THEN I.SumVatOriginal - I.DiscountVat ELSE 0 END) AS VirtualVat, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatLTL - I.DiscountVatLTL ELSE 0 END) AS VirtualVatLTL FROM bz b LEFT JOIN InvoicesMade O ON O.ID=b.Op_ID LEFT JOIN sfd as I ON I.SF_ID=O.ID LEFT JOIN asmenys C ON C.ID=b.Op_analitika WHERE b.Op_data>=$DF AND b.Op_data=$DF AND b.Op_data System.Data.SQLite.SQLiteException: SQLite error
no such column: I.VatIsVirtual
at System.Data.SQLite.SQLite3.Prepare(String strSql, SQLiteStatement previous, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[][T](Object criteria)
at ApskaitaObjects.ActiveReports.InvoiceInfoItemList.GetList(InvoiceInfoType nInfoType, DateTime nDateFrom, DateTime nDateTo, PersonInfo nPerson)
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
DataPortal_Fetch method call failed
Klaidos šaltinis(Ex.Source):
Csla
Klaidos metodas (Ex.TargetSite):
CallMethod
Klaidos stekas:
at AccDataAccessLayer.SqlServerSpecificMethods.SQLiteCommandManager.FetchCommand(SQLCommand SelectCommand)
at AccDataAccessLayer.DatabaseAccess.SQLUtilities.FetchCommand(SQLCommand SelectCommand)
at AccDataAccessLayer.DatabaseAccess.SQLCommand.Fetch()
at ApskaitaObjects.ActiveReports.InvoiceInfoItemList.DataPortal_Fetch(Criteria criteria)
at Csla.MethodCaller.CallMethod(Object obj, MethodInfo info, Object[] parameters)
at Csla.Server.SimpleDataPortal.Fetch(Type objectType, Object criteria, DataPortalContext context)
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
Klaida vykdant SELECT sakinį (statement): [SELECT O.ID, C.ID, C.Pavad, C.Kodas, C.SP_kodas, C.E_Mail, b.Op_data, b.Op_Dok, b.Op_turinys, O.CurrencyCode, O.CurrencyRate, O.LanguageCode, O.CommentsInternal, MAX(I.Tar), SUM(I.SumOriginal), SUM(I.SumVatOriginal), SUM(I.SumLTL), SUM(I.SumVatLTL), SUM(I.Discount), SUM(I.DiscountVat), SUM(I.DiscountLTL), SUM(I.DiscountVatLTL), O.AccountPayer, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatOriginal - I.DiscountVat ELSE 0 END) AS VirtualVat, SUM(CASE WHEN I.VatIsVirtual>0 THEN I.SumVatLTL - I.DiscountVatLTL ELSE 0 END) AS VirtualVatLTL FROM bz b LEFT JOIN InvoicesMade O ON O.ID=b.Op_ID LEFT JOIN sfd as I ON I.SF_ID=O.ID LEFT JOIN asmenys C ON C.ID=b.Op_analitika WHERE b.Op_data>=$DF AND b.Op_data=$DF AND b.Op_data