Re: Disallowing/Ignoring Insert based on certain column value
From: Harag (haragREMOVETHESECAPITALS_at_softhome.net)
Date: 08/17/04
- Next message: Tibor Karaszi: "Re: nondeterministic expressions"
- Previous message: Immy: "Re: Disallowing/Ignoring Insert based on certain column value"
- In reply to: SPhan: "Disallowing/Ignoring Insert based on certain column value"
- Next in thread: MC: "Re: Disallowing/Ignoring Insert based on certain column value"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 09:05:31 +0100
On Tue, 17 Aug 2004 00:44:13 -0700, "SPhan" <susan@spryersoft.com>
wrote:
>Can anyone help me on writing a trigger that disallows insert into the table
>based on certain condition.
>
>for example if the value that is being inserted in Employee Name column has
>text 'Unknow' then just ignore Insert.
>
Look up triggers, inserted and deleted in Books Online (BOL)
triggers have access to two tables (inserted & deleted)
try something like
delete from inserted where empname = "unknown"
I don't know if the above will work as I've never done anything like
that b4.
HTH
Al.
- Next message: Tibor Karaszi: "Re: nondeterministic expressions"
- Previous message: Immy: "Re: Disallowing/Ignoring Insert based on certain column value"
- In reply to: SPhan: "Disallowing/Ignoring Insert based on certain column value"
- Next in thread: MC: "Re: Disallowing/Ignoring Insert based on certain column value"
- Messages sorted by: [ date ] [ thread ]