group by a.str_n,a.obdobi order by a.str_n,a.obdobi
and obdobi=p_dat group by a.str_n order by a.str_n
str_s
Za st
group by a.str_s,a.obdobi order by a.str_s,a.obdobi
and obdobi=p_dat group by a.str_s order by a.str_s
str_n
Za t
group by a.str_n,a.obdobi,a.str_s order by a.str_n,a.obdobi,a.str_s
str_n
Za t
and obdobi=p_dat group by a.str_n,a.str_s order by a.str_n,a.str_s
SELECT a.str_s, a.str_n, sum(a.poriz) as poriz, sum(a.oprav) as oprav, a.obdobi,sum(a.zusta) as zusta, sum(a.odpis) as odpis, sum(a.cporiz) as cporiz, sum(a.coprav) as coprav, m(a.czusta) as czusta FROM m7_modp a INTO DBF c7_mmaj WHERE kod=p_kod &xxd
str_s
str_s
' '+str_n
str_n
' '+substr(str_n,1,1)+' '
str_n
str_s
str_s
Po
str(poriz,12,2)
poriz
Opr
str(oprav,12,2)
oprav
Z
statek
str(zusta,12,2)
zusta
Odpis
str(odpis,12,2)
odpis
Rekonstrukce
str(cporiz,12,2)
cporiz
Prodej
str(cporiz,12,2)
cporiz
Odpo
str(coprav,12,2)
coprav
Obdob
tran(obdobi,'@e')
obdobi
FREEZE
POLEX
4PS_TR
PS_STR
P_DAT
KLICO
FKLNAZ
DETAIL
lZAHL
JMENO
SOUC
P_KOD
sMOD_PSV
PS_TR
PS_STR
tCIS_SEC1
4CIS_SEC2
CIS_SEC3
p_kodf
ehledu
Opr
statek
Odpis
Rekonstrukce
Prodej
Odpo
P_KOD
tPORIZ
4OPRAV
ZUSTA
ODPIS
CPORIZ
FCOPRAV
LP_PORIZ
P_OPRAV
lP_ZUSTA
P_ODPIS
P_CPORIZ
P_COPRAV
p_kodf
SELECT a.str_s, a.str_n, sum(a.poriz) as poriz, sum(a.oprav) as oprav, sum(a.zusta) as zusta, sum(a.odpis) as odpis, sum(a.cporiz) as cporiz, sum(a.coprav) as coprav, sum(a.czusta) as czusta FROM &soubs a INTO DBF c7_sumaj GROUP BY a.str_s ORDER BY a.str_s
SELECT trida, str, o_sk, sum (hod1 ) as hod1, sum (hod2 ) as hod2, sum (hod3 ) as hod3, sum (hod4 ) as hod4, sum (hod5 ) as hod5, sum (hod6 ) as hod6, sum (hod7 ) as hod7, sum (hod8 ) as hod8, sum (hod9 ) as hod9, sum (hod10) as hod10, sum (hod11) as hod11, sum (hod12) as hod12, sum (ucetni) as ucetni, sum (danove) as danove FROM c7odp GROUP BY &Mklic INTO DBF c7sum ORDER BY &Mklic
copy to pomoc for &filt
SELECT trida, str, o_sk, sum (hod1 ) as hod1, sum (hod2 ) as hod2, sum (hod3 ) as hod3, sum (hod4 ) as hod4, sum (hod5 ) as hod5, sum (hod6 ) as hod6, sum (hod7 ) as hod7, sum (hod8 ) as hod8, sum (hod9 ) as hod9, sum (hod10) as hod10, sum (hod11) as hod11, sum (hod12) as hod12, sum (ucetni) as ucetni, sum (danove) as danove FROM pomoc GROUP BY &Mklic INTO DBF c7sum ORDER BY &Mklic