Files
flora2roa/ALTE/documente_duble.sql
Marius Mutu 2736cbd525 Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Include si sistemul de depanare/testare headless din Teste\ (harness UI cu capturi, verificare de sintaxa prin compilare, wrappere text<->binar) si docs\depanare_testare_flora2roa.md.
2026-08-02 08:56:52 +03:00

33 lines
1.6 KiB
SQL

--select t.*,rowid from act t where an=2024 and luna = 6 order by dataact, nract, cod;
/*select t.*,rowid from act t where an=2024 and luna = 3 and cod in (
select cod from
(with select_data as
(select distinct a.cod, a.dataact, a.nract, b.cod as codb from
(select distinct dataact, nract, suma, cod, explicatia4 from act where an=2024 and luna = 2 and sters = 0 and explicatia4 = 'IMPORT BIZ') a join
(select distinct dataact, nract, suma, cod, explicatia4 from act where an=2024 and luna = 2 and sters = 0 and explicatia4 is null) b on (a.dataact = b.dataact and a.nract = b.nract and a.suma = b.suma)
)
select cod from select_data
union
select codb from select_data))
order by dataact, nract, cod;*/
select an, luna, nract, dataact, scd, ascd, scc, ascc, suma, explicatia4, sters, id_utils, dataoras, cod from
(select an, luna, nract, dataact, scd, ascd, scc, ascc, suma, explicatia4, sters, id_utils, dataoras, cod from act
union
select an, luna, nract, dataact, scd, ascd, scc, ascc, suma, explicatia4, 0 as sters, 0 as id_utils, null as dataoras, cod from act_imp_2024)
where an=2024 and luna = 10 and cod in (
select cod from
(with select_data as
(select distinct a.cod, a.dataact, a.nract, b.cod as codb from
(select distinct dataact, nract, suma, cod, explicatia4 from act_imp_2024 where an=2024 and luna = 10 ) a join
(select distinct dataact, nract, suma, cod, explicatia4 from act where an=2024 and luna = 10 and sters = 0 and explicatia4 is null) b on (a.dataact = b.dataact and a.nract = b.nract and a.suma = b.suma)
)
select cod from select_data
union
select codb from select_data))
order by dataact, nract, cod, suma;