> folgendes machen: Verringere IntWert1 um @IntWert1, IntWert2  um
@IntWert2, IntWert3 um @IntWert3 �berall, wo datum >= @datum und datum <=
@Datum <

Meinst Du so etwas:

DECLARE @IntWert1 int,
                @IntWert2 int,
                @IntWert3 int,
                @Datum dateTime

SELECT  @IntWert1 = IntWert1,
                @IntWert2 = IntWert2,
                @IntWert3 = IntWert3,
                @datum = Datum
FROM            tabelle1
WHERE           ...

UPDATE  tabelle2
SET             IntWert1 = Intwert1 - @IntWert1,
                IntWert2 = IntWert2 - @IntWert2,
                IntWert3 = IntWert3 - @IntWert3
WHERE           ...
                AND     datum >= @datum und datum <= @Datum

Tsch��, Joachim


_______________________________________________
Database.asp mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/database.asp

Antwort per Email an