Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSsetupbelongs_withoutviewproc

  No additional text.


Syntax
create procedure sys.sp_MSsetupbelongs_withoutviewproc
    @publisher          sysname,
    @publisher_db       sysname,
    @publication        sysname,
    @artnick            int
AS
    declare @temp_id int
    declare @artnickstr nvarchar(10)
    declare @retval int
    declare @tablenick int
    declare @rowguid uniqueidentifier
    declare @rowguidstr nvarchar(40)
    declare @partchangegen bigint
    declare @retcode smallint

    set @artnickstr = convert(nchar(10), @artnick)

    delete from #temp_cont

    if exists(select * from #genlist)
    begin
        exec ('insert into #temp_cont (tablenick, rowguid, partchangegen)
                select tablenick, rowguid, partchangegen from dbo.MSmerge_contents where
                tablenick  = ' + @artnickstr + ' and generation in (select generation from #genlist)')
        if @@ERROR <>0
        begin
            return (1)
        end
    end

    set @temp_id = 0
    select @temp_id = min(temp_id) from #temp_cont where temp_id > @temp_id
    while (@temp_id is not null)
    begin
        select  @tablenick = tablenick, @rowguid = rowguid,
                @partchangegen = partchangegen
                from #temp_cont where temp_id = @temp_id
        set @rowguidstr = '''' + convert(nchar(36), @rowguid) + ''''
        exec @retcode = sys.sp_MSbelongs @publisher, @publisher_db, @publication, @tablenick, @rowguid, @retval output, 0
        if @@ERROR<>0 OR @retcode <>0
        begin
            return (1)
        end

        if @retval = 1
        begin
            insert into #belong (tablenick, rowguid, flag, skipexpand, partchangegen) values
                    (@artnick, @rowguid, 0, 0, @partchangegen)
            if @@ERROR <>0
            begin
                return (1)
            end
        end
        select @temp_id = min(temp_id) from #temp_cont where temp_id > @temp_id
    end

    return 0

 
Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)
sp_MSsetupbelongs (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