Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSgettransarticlecolumnlist

  No additional text.


Syntax


-- Name: sp_MSgettransarticlecolumnlist

-- Descriptions:

-- Parameters: as defined in create statement

-- Returns: 0 - success
--          1 - Otherwise

-- Security: Public
-- Requires Certificate signature for catalog access

create procedure sys.sp_MSgettransarticlecolumnlist
(
    @article_id int,
    @include_timestamp bit,
    @column_list nvarchar(max) output
)
as
begin
    set nocount on
    declare @column_name sysname
    declare @separator nvarchar(5)

    declare #hc cursor local fast_forward for
        select sc.name
          from sys.columns sc
    inner join dbo.sysarticles art
            on sc.object_id = art.objid
         where art.artid = @article_id
           and (exists (select * from dbo.sysarticlecolumns sac
                         where sac.artid = @article_id
                           and sac.colid = sc.column_id)
                or
                (@include_timestamp = 1 and sc.system_type_id = 189))
         order by sc.column_id asc

    set @separator = N''

    if @column_list is null
    begin
        set @column_list = N''
    end

    set @column_list = ltrim(@column_list)
    open #hc
    fetch #hc into @column_name
    while (@@fetch_status <> -1)
    begin
        set @column_list = @column_list + @separator + quotename(@column_name)
        set @separator = N','

        fetch #hc into @column_name
    end
    close #hc
    deallocate #hc
    return 0

end

 
Last revision 2008RTM
See also

  sp_MSarticle_validation (Procedure)
sp_MSdrop_repltran (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