Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSset_timestamp_bm

  No additional text.


Syntax
create procedure sys.sp_MSset_timestamp_bm
    @timestampbm varbinary(500) output,
    @objid int
as
begin
    declare @previouscolid smallint
    declare @colid smallint
    declare @columnordinal smallint

    set @timestampbm= 0x00

    if exists (select * from sys.columns where object_id = @objid and
                                               system_type_id = type_id('timestamp'))
    begin
        set @columnordinal= 0
        set @previouscolid= -1

        while (1=1)
        begin
            set @columnordinal= @columnordinal + 1

            set @colid= (select min(column_id) from sys.columns
                            where object_id = @objid and
                                  column_id > @previouscolid)

            if @colid is null
                break

            set @previouscolid= @colid

            if 'timestamp' = (select type_name(system_type_id) from sys.columns
                                where object_id = @objid and column_id = @colid)
            begin
                -- Use @colid for the @coltoadd parameter, not @columnordinal,
                -- because columns_updated() also behaves like this.
                exec sys.sp_MSsetbit @bm= @timestampbm output,
                                     @coltoadd= @colid,
                                     @toset= 1

                -- A table has at most one timestamp column.
                break
            end
        end
    end

    return 0
end

checkpoint

 
Last revision 2008RTM
See also

  sp_MSaddupdatetrigger (Procedure)
sp_MScreatelightweightinsertorupdatetriggers (Procedure)
sp_MSdrop_rlcore (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