SimpleOperator Enumeration
Operators supported for SimpleLeafCondition.
네임스페이스: Microsoft.SqlServer.NotificationServices.Rules
어셈블리: Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)
구문
‘선언
Public Enumeration SimpleOperator
public enum SimpleOperator
public enum class SimpleOperator
public enum SimpleOperator
public enum SimpleOperator
Members
Member name | Description |
---|---|
Equals | The SimpleLeafCondition evaluates to true if the arguments are equal. |
GreaterThan | The SimpleLeafCondition evaluates to true if the Left argument is greater than the Right argument. |
GreaterThanOrEqualTo | The SimpleLeafCondition evaluates to true if the Left argument is greater than or equal to the Right argument. |
LessThan | The SimpleLeafCondition evaluates to true if the Left argument is less than the Right argument. |
LessThanOrEqualTo | The SimpleLeafCondition evaluates to true if the Left argument is less than or equal to the Right argument. |
Like | The SimpleLeafCondition evaluates to true if the character string in the Left argument matches the pattern in the Right argument. For more information, see LIKE(Transact-SQL). |
NotEquals | The SimpleLeafCondition evaluates to true if the Left argument does not equal the Right argument. |
예
The following example shows the use of the Equals and LessThanOrEqualTo operators:
// Create the NSInstance object.
NSInstance testInstance =
new NSInstance("InventoryTrackerInstance");
// Create the NSApplication object.
NSApplication testApplication =
new NSApplication(testInstance, "InventoryTracker");
// Create Subscription object.
Subscription s = new Subscription(testApplication,
"InventoryTrackerSubscriptions");
// Define subscription properties
s.SubscriberId = "TestUser1";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s["DeviceName"] = "Work e-mail";
s["SubscriberLocale"] = "en-US";
// Define OrCondition
s.Condition = new AndCondition(
new SimpleLeafCondition(new FieldValue("ProductName"),
SimpleOperator.Equals,
"Road-250 Black, 48"),
new SimpleLeafCondition(new FieldValue("LocationName"),
SimpleOperator.Equals,
"Final Assembly"),
new SimpleLeafCondition(new FieldValue("Quantity"),
SimpleOperator.LessThanOrEqualTo,
35)
);
// Add subscription
s.Add();
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.