> > Does this trigger not compute, is not accepted, or does not work once > installed? What is the problem exactly? >
It works fine. Initially I was not able to find any good examples of a conditional trigger but after a lot more searching I was able to find one that validated that it might work, so I finally tried it and it did work. All in all I am so use to everything in SQL having to be result set based it looked to simple to work, so I got cold feet. > > From a cursory glance, I can tell you that the this line: > > " SELECT f1.FolderId, f1.ImageId, (SELECT MIN(f2.instertedon) FROM" > > messes with my OCD, which might be a clue - did you mean to spell > "Inserted On" like "f2.instertedon"? That piece is correct. The whole idea is this: the favorites table is a list of images a user has marked as favorites. The SlideShowImage table is a list of the images in a slide show. The slideshow is made up of images users marked to be in their favorites in the order that they added the images without duplicates. The reason for the inner select, looking for the min(f2.instertedon) is to find the very first time the image was added to the favorites. The very end of the outer select does have a ssi.rowid is null to make sure that if the image is already in the slide show, it is not inserted again.

