<budget_ name>!REMOVE_ TAG¶
Removes a tag/value combination from a custom budget. The tag must be removed by reference.
Important
This method has been deprecated. Use <budget_name>!SET_RESOURCE_TAGS instead.
语法
实参
'tag_reference'The serialized string representation that resolves to an tag. This string is the output of the SYSTEM$REFERENCE function.
reference_statementA SYSTEM$REFERENCE statement that creates a reference for the tag to be removed from the budget.
'tag_value'指定要从预算中移除的标签/值组合的值。
如果使用其他值将标签添加到预算中,则在移除此特定标签/值组合后,该标签将继续与预算相关联。
返回
返回 VARCHAR 值,用于指明标签/值组合是否已成功从预算中移除。
如果无法从预算中移除标签,该函数将返回一条错误消息。
访问控制要求
要对 自定义预算 调用此方法,需要具备以下最低权限和角色:
- ADMIN instance role for the budget instance.
- 对包含预算实例的数据库和架构的 USAGE 权限。
- 对包含标签的数据库和架构的 USAGE 权限。
- 对被移除标签的 APPLYBUDGET 权限。
For more information, see Budgets roles and privileges.
使用说明
- 此方法只能在 自定义预算 实例上调用。
-
Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.
示例
- Retrieve the tag reference before calling the method to remove the tag/value combination.
The following statement creates and returns a reference for the
cost_centertag:该语句会在输出中返回引用。
The following statement uses the string literal for this reference to add the
cost_center = 'sales'tag/value combination to thebudget_db.budget_schema.my_budgetbudget:- Include the SYSTEM$REFERENCE function in the argument directly
After executing the following statement, the budget will no longer track objects that are tagged with the tag/value combination
team_tag = 'finance'.