RE: Conditional unique index?

RE: Conditional unique index?

 

  

Right, I don't know why

select * from
test1386 a JOIN inserted b ON a.person=b.person AND a.favorite=b.favorite
where a.favorite='TRUE'

should act like

select * from inserted where favorite='TRUE'

but it certainly seems to...

-----Original Message-----
From: Guzman [mailto:mssqldba-ezmlmshield-x17220244.[Email address protected]

Sent: Thursday, September 28, 2006 5:57 PM
To: LazyDBA Discussion
Subject: RE: Conditional unique index?

I like this Mordechai, but I've tried to insert this into the update
trigger already in that table, and it doesn't work. First you need to
remove the AND part of the select. If I have other stuff that comes
after the ROLLBACK_TRANSACTION statement, it won't get run will it? It
doesn't seem to. Anyway, on an Update trigger, this code rolls back ALL
transactions. It let me change a true to false, but I can't change a
false to true. The select statement seems fine in QA (without the AND
section), so why is it always true?



MS Sql Server LazyDBA home page