Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_isarticlecolbitset

  No additional text.


Syntax

create procedure sys.sp_isarticlecolbitset
(
    @colid int
    ,@artid int
    ,@publishertype tinyint=1        -- 1 = mssqlserver, 2 = heterogeneous
    ,@agent_id	int = NULL  	-- null @agent_id means this is executed at pub side,
    										-- pub queries sysarticlecolumns for article column partition,
    										-- sub uses MSsubscription_articlecolumns
)
as
begin
    declare @retcode int
                ,@pubtypemssqlserver tinyint
                ,@pubtypeheterogenous tinyint

    -- initialize
    select     @retcode = 0
                ,@pubtypemssqlserver = 1
                ,@pubtypeheterogenous = 2
    -- process based on publisher type
    if (@publishertype = @pubtypemssqlserver)
    begin
        -- mssqlserver publisher
        if (@agent_id is null)
        begin
	        if exists (select artid from dbo.sysarticlecolumns where artid = @artid and colid = @colid)
    	       select @retcode = 1
    	 end
    	 else
        begin
	        if exists (select artid from dbo.MSsubscription_articlecolumns where artid = @artid and colid = @colid
	        																												and agent_id = @agent_id)
    	       select @retcode = 1
    	 end
    end
    else if (@publishertype = @pubtypeheterogenous)
    begin
        -- heterogeneous publisher
        if exists (select article_id from IHcolumns where article_id = @artid and column_id = @colid)
           select @retcode = 1
    end
    else
    begin
        raiserror(21402, 16, 14, '@publishertype')
    end
    -- return
    return @retcode
end

 
Last revision 2008RTM
See also

  sp_MSget_colinfo (Procedure)
sp_MSget_col_position (Procedure)
sp_MSisnonpkukupdateinconflict (Procedure)
sp_MSispkupdateinconflict (Procedure)
sp_MSmakeconflicttable (Procedure)
sp_MSscript_params (Procedure)
sp_MSscript_pkvar_assignment (Procedure)
sp_MSscript_update_statement (Procedure)
sp_MStable_not_modifiable (Procedure)
sp_scriptdelproccore (Procedure)
sp_scriptinsproccore (Procedure)
sp_scriptpkwhereclause (Procedure)
sp_scriptreconwhereclause (Procedure)
sp_scriptupdateparams (Procedure)
sp_scriptupdproccore (Procedure)
sp_vupgrade_sysarticlecolumns (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