|
Posted by R.A.M. on 07/06/06 08:46
On Thu, 6 Jul 2006 08:25:27 +0000 (UTC), Erland Sommarskog
<esquel@sommarskog.se> wrote:
>I understand the errors, but I understand about as little of your
>trigger that SQL Server does. You seem to be making things up out of
>thin air. When you say:
>
> IF Documenty.Movement = 'PZ' OR Documents.Movement = 'ZW'
I meant Documents.Movement
>
>What are Documenty and Documents supposed to be? Maybe you mean
>
> IF EXISTS (SELECT *
> FROM deleted
> WHERE movement IN ('PZ', 'ZW'))
Exactly
>
>
>The same goes for
>
> DELETE FROM PositionsPZZW
> WHERE Documents.Number IN (SELECT Number FROM deleted);
>
>This would compile if you have a column Documents in PositionsPZZW,
>and this columns is of a CLR UDT and had an attribute named Number.
>What this really should be, I don't even want to guess, since I know
>nothing about PositiosnPZZW.
I need:
IF EXISTS (SELECT * FROM deleted WHERE Movement IN ('PZ', 'ZW'))
DELETE FROM PositionsPZZW
WHERE Number IN (SELECT Number FROM deleted);
>By the way, why are there three Positions tables? Maybe there is a good
>reason for this, but I have a suspicion that one should do.
They have different columns describing items.
Thank you, you have helped me... Problem closed
Could you help me with post "one more question"? Thank you!
/RAM/
[Back to original message]
|