April 22, 2009 at 2:28 pm
Hi,
if i use SP_HELPTEXT
Is there any where to see which System table stores the definition of the RULE.
reagrds
sandhya
April 22, 2009 at 5:59 pm
find any column that has been tied to a rule:
select
object_name(syscolumns.id) as tablename,
syscolumns.name as columnname,
object_name(syscolumns.domain) as RuleName,
syscomments.TEXT as RuleDefinition
from syscolumns
inner join syscomments on syscolumns.domain = syscomments.id
where syscolumns.domain > 0
a rule that exists, but may or may not be tied to a column:
select name as RuleName,
syscomments.TEXT as RuleDefinition
from sysobjects
inner join syscomments on sysobjects.id = syscomments.id
where sysobjects.xtype='R'
Lowell
April 22, 2009 at 7:47 pm
sandhya_vemulla (4/22/2009)
Is there any where to see which System table stores the definition of the RULE.
You are looking for the system view sys.all_sql_modules. Specifically the definition column.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply