TSQL Logic Help
This query will return if it's not intersected.select isnull(t1.vName+' is correct', @vName+' is Incorrect') [result]from Rules t1where t1.vName=@vNameand not exists(select 1 from Rules t2where...
View ArticleTSQL Logic Help
Try this out:select t1.RuleID,t1.vMin,t1.vMax,t1.vName from TblRule t1, TblRule t2 where t1.vname='Rule2' and ((t1.vmin> t2.vmin and t1.vmax<t2.vmax) or (t1.vmin < t2.vmin and t1.vmax >...
View ArticleTSQL Logic Help
Maybe I wasn't clear in my question. I have this situation. I have a table that has 1000s of rules that comes from an XML table (There is no insert check on the table) all the rules have Min and Max...
View ArticleTSQL Logic Help
I don't quite understand what you're looking for. But here is something that might help.declare @tb table(ruleid int primary key, vMin int, vMax int, vName sysname)insert @tbselect 1,10,20,'a'union all...
View ArticleTSQL Logic Help
I have a Rule table that looks like this.Rule_ID (PK)vMinvMaxvName I would be recieving the vName as an input. I need to go through the table to make sure that the rules (Min and Max) are not...
View Article