|
Posted by Hugo Kornelis on 01/10/06 23:46
On 10 Jan 2006 11:28:32 -0800, bsandell@gmail.com wrote:
>Hi,
>
>I have a view that looks something like this -
>
>CREATE VIEW myview AS SELECT
> myudf(col1) as col1, col2, col3
>FROM mytable
>
>The view has an 'INSTEAD OF' trigger on it to do the correct thing on
>insert. When I run the bcp, it runs successfully, but the value
>inserted into col1 is always NULL. I modified my trigger to get a
>better idea of what was happening, and when I look at the values of
>INSERTED.col1, they are all null. It appears that bcp is setting the
>column value to null, presumable because the view definintion for this
>column is a derived column.
>
>Does any one know a way around this?
>
>Thanks!
Hi bsandell,
By default, triggers are not fired for bulk copy statements.
To override this default, add the option
-h "FIRE_TRIGGERS"
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|