Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 problem with rule.plz solve my problem

Author  Topic 

noorahmed.shaik
Starting Member

11 Posts

Posted - 2007-07-06 : 08:47:21
[code]I created an "RULE" and i binded to so many tables.
can anybody say how can get the information for which
are the tables that "RULE" IS BINDED..

Thanks in advance[/code]

Noor Ahmed
Keysoft solution

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-07-06 : 09:29:14
[code]
select
so1.name as parent
,sc.name as columnname
,so2.name as defaultname
,so3.name rulename
from syscolumns sc
join sysobjects so1 on so1.id=sc.id
left join sysobjects so2 on so2.id=sc.cdefault
left join sysobjects so3 on so3.id=sc.domain
where (so2.id is not null or so3.id is not null)
order by 1 asc
[/code]

this should work on 2000 or 2005. see the app in my sig if you want to view dependencies like this graphically.

EDIT: forgot to mention that rules are deprecated in 2005 - you should think about using check constraints instead.


elsasoft.org
Go to Top of Page
   

- Advertisement -