基になる列と対象となる列を使用して、JoinClause クラスの新しいインスタンスを初期化します。
名前空間: Microsoft.SqlServer.NotificationServices.Rules
アセンブリ: Microsoft.SqlServer.NotificationServices.Rules (microsoft.sqlserver.notificationservices.rules.dll 内)
構文
'宣言
Public Sub New ( _
sourceColumn As Column, _
targetColumn As Column _
)
public JoinClause (
Column sourceColumn,
Column targetColumn
)
public:
JoinClause (
Column^ sourceColumn,
Column^ targetColumn
)
public JoinClause (
Column sourceColumn,
Column targetColumn
)
public function JoinClause (
sourceColumn : Column,
targetColumn : Column
)
パラメータ
- sourceColumn
結合内の基になる列を表す Column オブジェクトです。このパラメータで SourceColumn プロパティを設定します。
- targetColumn
結合内の対象となる列を表す Column オブジェクトです。このパラメータで TargetColumn プロパティを設定します。
使用例
次の例では、JoinClause オブジェクトを使用してイベント ビューとテーブルの間に結合のチェーンを定義する方法を示します。
// Subscribe to products in Subassembly location. This
// requires select permissions on all tables in the sample.
//Specify server and database.
Server server = new Server("MyServer");
Database db = server.Databases[nsApplication.DatabaseName];
// Specify tables and views used by the condition.
Table locationTable = db.Tables["Location", "Production"];
Table inventoryTable = db.Tables["ProductInventory", "Production"];
View eventView = db.Views["InventoryTrackerEvents",
"NS_InventoryTrackerApplication"];
// Filter defining "Subassembly" locations.
FilterRule toolCrib = new FilterRule(
new TableInputType(db.Tables["Location", "Production"]),
new SimpleLeafCondition(new FieldValue("Name"),
SimpleOperator.Equals, "Subassembly"));
// Create subscription and define basic properties.
s = new Subscription(nsApplication, subscriptionClassName);
s.SubscriberId = "Stephanie";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s.SetFieldValue("DeviceName", "myDevice");
s.SetFieldValue("SubscriberLocale", "en-us");
// Define a condition using the filter.
s.Condition = new LinkLeafCondition(
LinkLeafOperator.Any,
toolCrib,
new JoinClause(eventView.Columns["ProductId"],
inventoryTable.Columns["ProductId"]),
new JoinClause(inventoryTable.Columns["LocationId"],
locationTable.Columns["LocationId"]));
// Add subscription.
s.Add();
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
JoinClause Class
JoinClause Members
Microsoft.SqlServer.NotificationServices.Rules Namespace