Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSscript_trigger_fetch_statement

  No additional text.


Syntax
create procedure sys.sp_MSscript_trigger_fetch_statement (
    @objid   int
    ,@op_type char(3) = 'ins'
    ,@indent   int = 0
    ,@fisqueued bit
)
as
BEGIN
    declare @cmd          nvarchar(4000)

    -- script fetch statements
    if @op_type in ('ins', 'upd')
    begin
        exec sys.sp_MSpad_command @cmd output, @indent
        select @cmd = @cmd + N'fetch next from rpl_ins_cursor into
'
        exec sys.sp_MSflush_command @cmd output, 1, @indent
        exec sys.sp_MSscript_trigger_variables @objid, '@', null, @indent, ' '
    end
    if (@fisqueued = 0)
    begin
        
        -- Immediate insert trigger - cache the inserted values for identity operation
        
        if @op_type in ('ins')
        begin
            exec sys.sp_MSpad_command @cmd output, @indent
            select @cmd = @cmd + N'fetch next from rpl_ins2_cursor into
'
            exec sys.sp_MSflush_command @cmd output, 1, @indent
            exec sys.sp_MSscript_trigger_variables @objid, '@', '_old', @indent, ' '
        end
    end
    if @op_type in ('upd', 'del')
    begin
        exec sys.sp_MSpad_command @cmd output, @indent
        select @cmd = @cmd + N'fetch next from rpl_del_cursor into
'
        exec sys.sp_MSflush_command @cmd output, 1, @indent
        exec sys.sp_MSscript_trigger_variables @objid, '@', '_old', @indent, ' '
    end
END

 
Last revision 2008RTM
See also

  sp_MSscript_multirow_trigger (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash