• Chris Harshman - Wednesday, June 28, 2017 2:53 PM

    Jeff Moden - Wednesday, June 28, 2017 6:55 AM

    Heh...  what's the last cursor you wrote and what did it do?

    unfortunately had to write one this week... look through rows of a document table for the last 48 hours and compare the FileName column to the results of xp_fileexist to try to find missing documents (without waiting for the users to say "hey... the file doesn't open!")

    Okay, I'm going to pretend to be a little obtuse, but couldn't you run the results of xp_fileexists into a temp table, pull the document table into another temp table with a "FileExists" bit column set to 0 (or 1 if you prefer your falses to be 1), then update that column in a set-based update for all file names that match?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.