--____MSTUACFRZNNHNJNRGKMD____
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; modification-date="Thu, 18 Apr 2007 19:53:50
+0200"
Hallo,
ich hätte in einer View gern den Wert aus der Bewegungstabelle =
(sachposten) angezeigt. Wenn er leer ist soll aber der Wert aus der =
Stammtabelle (tbl_std_sachkonto) gezogen werden. Ich hatte mir das so =
gedacht:
CREATE ALGORITHM=3DUNDEFINED DEFINER=3D`root` [at] `%` SQL SECURITY DEFINER =
VIEW `v_kosten_prokostenstelle` AS
select
`sachposten`.`Sachkonto` AS `Sachkonto`,
if `sachposten`.`Kostenstelle` not null, `sachposten`.`Kostenstelle`,`t=
bl_std_sachkonto`.`Kostenstelle` as KST,
sum(`sachposten`.`Betrag`) AS `FIELD_1`
from
(`sachposten` join `tbl_std_sachkonto` on((`sachposten`.`Sachkonto` =
=3D `tbl_std_sachkonto`.`SachkontoNr`)))
where
((`tbl_std_sachkonto`.`GuV_Bilanz` =3D _latin1'guv') and (`sachposten`.=
`Buchungsperiode` =3D _latin1'200701') and (`tbl_std_sachkonto`.`Kostenstel=
le_zwingend` =3D _latin1'ja'))
group by
`sachposten`.`Sachkonto`;
Aber das klappt nicht.
Hat jemand einen Tipp?
TIA
Gruß Ulf
--____MSTUACFRZNNHNJNRGKMD____
Content-Type: multipart/related; boundary="____VSEJDUBMUSARSQNDOHJP____"
--____VSEJDUBMUSARSQNDOHJP____
Content-Type: text/html; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; modification-date="Thu, 18 Apr 2007 19:53:50
+0200"
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-15=
">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hallo,</DIV>
<DIV> </DIV>
<DIV>ich hätte in einer View gern den Wert aus der Bewegungstabelle =
(sachposten) angezeigt. Wenn er leer ist soll aber der Wert aus der =
Stammtabelle (tbl_std_sachkonto) gezogen werden. Ich hatte mir das so =
gedacht:</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>CREATE ALGORITHM=3DUNDEFINED <A href=3D"mailto:DEFINER=3D`root` [at] `%">DE=
FINER=3D`root` [at] `%</A>` SQL SECURITY DEFINER VIEW `v_kosten_prokostenstelle`=
AS <BR> select <BR> `sachposten`.`Sachkonto` AS =
`Sachkonto`,<BR> if `sachposten`.`Kostenstelle` not =
null, `sachposten`.`Kostenstelle`,`tbl_std_sachkonto`.`Kostenstell e` as =
KST,<BR> sum(`sachposten`.`Betrag`) AS `FIELD_1`<BR> =
; from <BR> (`sachposten` join `tbl_std_sachkonto` =
on((`sachposten`.`Sachkonto` =3D `tbl_std_sachkonto`.`SachkontoNr`))) =
<BR> where <BR> ((`tbl_std_sachkonto`.`GuV_Bilanz` =
=3D _latin1'guv') and (`sachposten`.`Buchungsperiode` =3D _latin1'200701') =
and (`tbl_std_sachkonto`.`Kostenstelle_zwingend` =3D _latin1'ja')) =
<BR> group by <BR> `sachposten`.`Sachkonto`;</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Aber das klappt nicht. </DIV>
<DIV> </DIV>
<DIV>Hat jemand einen Tipp?</DIV>
<DIV> </DIV>
<DIV>TIA</DIV>
<DIV>Gruß Ulf</DIV>
<DIV> </DIV></BODY></HTML>
--____VSEJDUBMUSARSQNDOHJP____--
--____MSTUACFRZNNHNJNRGKMD____--
