View Issue Details

IDProjectCategoryView StatusLast Update
0001509Database Comparer VCLGeneralpublic2020-02-23 08:01
Reportershirokov Assigned Tobarry  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version7.0.0.1680 
Target Version7.0.0.1680Fixed in Version7.1.0.1681 
Summary0001509: Cannot compare Firebird 3 databases if there is a statement MERGE SUM() OVER()
DescriptionCannot compare Firebird 3 databases if there is a statement
 MERGE INTO dgk D
 USING (SELECT DOK.DOK_ID, DOK.dok_dgk FROM dok WHERE DOK.ifak_id = :i_izvor_id)
Source
 ON (D.DGK_ID = Source.DOK_DGK)
 WHEN MATCHED THEN DELETE;

and also there is an error on statement SUM() OVER (Partition By)

The comparing log is attached.
TagsNo tags attached.

Activities

shirokov

2019-04-25 18:56

administrator  

dbcCompare.Log (4,416 bytes)   
17.04.2019 21:24:26(I)  17.04.2019 21:24:26 Error: Procedure ACT_INV_PS_PRETHODNA_GODINA: Missing: INTO (<Ident>: PASSWORD)
Script:  Line:17 Pos:32

17.04.2019 21:24:27(I)  17.04.2019 21:24:27 Linking dependencies...
17.04.2019 21:24:27(I)  17.04.2019 21:24:27 Extracting master database metadata: "localhost/3053:E:\DELPHI\RADNI\PDV2009\PODACI\PDV2019.FDB".
17.04.2019 21:24:27(I)  17.04.2019 21:24:27 !!! < Comparing finished Abnormally... >


FOR EXECUTE STATEMENT :SQL
     AS USER 'SYSDBA' PASSWORD 'masterke'
     WITH COMMON TRANSACTION
     WITH CALLER PRIVILEGES
     ON EXTERNAL :db
     INTO :MAG_ID, :ROBA_ID, :STANJE, :CIJENA

Message: MISSING INTO, MUST BE DO.....
-----------------------------------------------------------
FOR EXECUTE STATEMENT (:SQL) (ULAZ_DAT := :VKALK_DOBAVDAT, ULAZ_DOBAV := :KOMIT_OPIS, PLACANJE_ID := :PLACANJE_ID, vkalk_id := :VKALK_ID)
      AS USER 'SYSDBA' PASSWORD 'masterke'
      WITH COMMON TRANSACTION
      WITH CALLER PRIVILEGES
      ON EXTERNAL :db
      INTO :ULAZ_ID
      do
         SUSPEND;
Message: MISSING INTO, MUST BE DO.....
-----------------------------------------------------------
         EXECUTE STATEMENT (:SQL)
           (ULAZ_ID := :Ulaz_ID, TARIFA_ID := :TARIFA_ID, REPRO_ID := :ROBA_ID, ULAZS_KOL := SVK_KOL, ULAZS_CIJENA := SVK_FCIJENA, ULAZS_FINULAZ := NULL, ULAZS_POREZ := :SVK_POREZ_I,
            ULAZS_ULSP := NULL, ULAZS_PROD_CIJENA := :SVK_CIJENA, ULAZS_PROD_VRIJED := SVK_PV, ULAZS_PROD_PDV := NULL)
         AS USER 'SYSDBA' PASSWORD 'masterke'
         WITH COMMON TRANSACTION
         WITH CALLER PRIVILEGES
         ON EXTERNAL :db;

Message: MISSING AS, Missing: (, Missing: SELECT
------------------------------------------------------------
 MERGE INTO dgk D
    USING (SELECT DOK.DOK_ID, DOK.dok_dgk FROM dok WHERE DOK.ifak_id = :i_izvor_id) Source
    ON (D.DGK_ID = Source.DOK_DGK)
    WHEN MATCHED THEN DELETE;

Message: MISSING SET
------------------------------------------------------------
SELECT S.KONTO_ID, S.KOMIT_ID, COALESCE(Povezano.ios_iznos, 0) AS Duguje, S.SDGK_POT - S.SDGK_DUG AS Potrazuje
       , (S.SDGK_POT - S.SDGK_DUG) - COALESCE(Povezano.ios_iznos, 0) AS Ostalo
       , SUM((S.SDGK_POT - S.SDGK_DUG) - COALESCE(Povezano.ios_iznos, 0)) OVER (PARTITION BY S.KOMIT_ID ORDER BY D.DGK_DAT, S.sdgk_id) AS Kumulativ
       , S.sdgk_id, D.dgk_dat, D.dgk_tipdok, D.dgk_broj, D.dgk_opis, D.DGK_ID, 'D' AS Vrsta
  FROM SDGK S
  INNER JOIN DGK D On (D.dgk_id = S.dgk_id)
  INNER JOIN KOMIT K ON (K.dob_konto_id = S.konto_id and S.komit_id = K.komit_id) -- dob_konto_id
  LEFT JOIN (select I.ios_po_cemu, Sum(I.ios_iznos) AS ios_iznos From IOS I GROUP BY I.ios_po_cemu) AS Povezano ON Povezano.ios_po_cemu = S.sdgk_id
  Where S.SDGK_POT - S.SDGK_DUG > 0 and ((S.KOMIT_ID = :i_komit_id) or (:i_komit_id = -1))
  AND (S.SDGK_POT - S.SDGK_DUG) - COALESCE(Povezano.ios_iznos, 0) <> 0

Message: Missing: FROM, Missing INTO, MUST BE DO
-------------------------------------------------------------
For
      Select P.STOPA, SUM(P.STOPA) OVER (PARTITION BY P.TB) USTOPA From p_por_stopa_det(:vkalk_dat) P
      Where P.tb = :tarifa_id
      Into :stopa, :ustopa
    do

Message: MISSING FROM, INTO, MUST BE DO
-------------------------------------------------------------
SQL = 'SELECT KONTO_ID, KONTO_OPIS, KONTO_PS, KONTO_DEVIZNI, KONTO_ANALITIKA, KONTO_MT, KONTO_VT, KONTO_SUBANALITIKA, KONTO_VANBILANS FROM KONTO WHERE StrLen(KONTO_ID) = 1';
  FOR EXECUTE STATEMENT :SQL
      ON EXTERNAL :DB
      AS USER CURRENT_USER
      PASSWORD 'masterkey'
      WITH AUTONOMOUS TRANSACTION
      INTO :KONTO_ID, :KONTO_OPIS, :KONTO_PS, :KONTO_DEVIZNI, :KONTO_ANALITIKA, :KONTO_MT, :KONTO_VT, :KONTO_SUBANALITIKA, :KONTO_VANBILANS
  DO
  BEGIN

Message: MISSING INTO, MUST BE DO
-------------------------------------------------------------
SQL = 'SELECT R.REPORT_ID, R.REPORT_NAME, R.REPORT_PATH, R.COMPONENTS_LEFT, R.REPORT_TITLE, R.MASTER_DATASET, R.REDOSLED, R.GRUPA, R.QUERY, R.REFRESH_DATASET FROM REPORT R';
  FOR EXECUTE STATEMENT :SQL ON EXTERNAL :DB AS USER CURRENT_USER PASSWORD 'masterkey' WITH AUTONOMOUS TRANSACTION
  INTO :REPORT_ID, :REPORT_NAME, :REPORT_PATH, :COMPONENTS_LEFT, :REPORT_TITLE, :MASTER_DATASET, :REDOSLED, :GRUPA, :QUERY, :REFRESH_DATASET
  DO
  BEGIN

Message: MISSING INTO, MUST BE DO











dbcCompare.Log (4,416 bytes)   

barry

2019-04-26 16:20

administrator   ~0004082

Last edited: 2019-04-26 16:21

View 2 revisions

А можно нормальный скрипт или базу? Какие-то обрывки в логе...

Issue History

Date Modified Username Field Change
2019-04-25 18:56 shirokov New Issue
2019-04-25 18:56 shirokov Status new => assigned
2019-04-25 18:56 shirokov Assigned To => barry
2019-04-25 18:56 shirokov File Added: dbcCompare.Log
2019-04-26 16:20 barry Note Added: 0004082
2019-04-26 16:21 barry Note Edited: 0004082 View Revisions
2019-04-26 21:49 barry Status assigned => resolved
2019-04-26 21:49 barry Resolution open => fixed
2019-04-26 21:49 barry Fixed in Version => 7.1.0.1681
2020-02-23 08:01 barry Status resolved => closed