ASku rašė:
Niemand rašė:
ASku rašė:
Bendras\Query browser įvykdykite:
SELECT * FROM invoicesreceived;
ir pažiūrėkit, kas pas jus stulpelyje ActualDate
Prisegu
Įrašykite "SELECT * FROM invoicesreceived;" į tą didelį tekstinį laukelį ir paspauskite Execute...
Tuščias stulpelis ActualDate
[/quote]
Įvykdykite ten pat:
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, 'LT', O.CommentsInternal, MAX(I.Tarif), SUM(I.SumOriginal),
SUM(I.SumVatOriginal), SUM(I.SumLTL), SUM(I.SumVatLTL), 0, 0, 0, 0, O.AccountSupplier, 0,
O.IndirectVatSum, C.StateCode, C.CodeIsNotReal, O.InvoiceType,
CASE WHEN O.ActualDate IS NULL THEN b.Op_data ELSE O.ActualDate END AS ActualDate
FROM bz b
LEFT JOIN InvoicesReceived O ON O.ID=b.Op_ID
LEFT JOIN sfg as I ON I.BZ_ID=O.ID
LEFT JOIN asmenys C ON C.ID=b.Op_analitika
WHERE b.Op_data>='2017-01-01' AND b.Op_data<='2017-01-31' AND NOT O.ID IS NULL
GROUP BY O.ID ORDER BY b.Op_data, b.Op_Dok;
Vėlgi aktualu, ką rodo stulpelis ActualDate