sp_addprimaryart

Description

Creates a new primary article (or articles) in a specified publication.

Syntax

sp_addprimaryart pub_name [, pri_art [, field_nums]]

Parameters

pub_name

is the name of the publication to which the new article is added.

pri_art

is the name of a primary object. Primary object names can be specified in the form owner.name.

field_nums

is one or more numbers that identify the fields to be published. Numbers can be entered with separating commas, or with dashes to indicate inclusive ranges.

Examples

Example 1

sp_addprimaryart pubdoc, table1

Creates a new primary article in the publication pubdoc for the primary object table1, with all fields in the primary object published, or adds an existing primary article named table1 to the publication pubdoc.

Example 2

sp_addprimaryart pubdoc, table1, "2-6, 8"

Creates a new primary article in the publication pubdoc for the primary object table1, publishing only fields (columns) 2, 3, 4, 5, 6, and 8 from the primary object.

Usage

See also

sp_addprimaryconn, sp_addpub, sp_addreplicateart, sp_helpprimaryart, sp_helpprimaryconn, sp_helppub