Function and SP to find if file/directory exists

  • Simon Sabin

    SSCrazy Eights

    Points: 8142

    Comments posted to this topic are about the item Function and SP to find if file/directory exists


    Simon Sabin
    SQL Server MVP

    http://sqlblogcasts.com/blogs/simons

  • jeetv

    Valued Member

    Points: 53

    Hi Simon,

    I tried using this nice code in SQL Server 2005 but it fails with the message "Only functions and extended stored procedures can be executed from within a function".

    I was wondering how this could be updated to run in SQL Server 2005...I am not a DBA myself:-)

    Thanks!

  • Andy DBA

    SSCommitted

    Points: 1776

    jeetv (7/7/2010)


    Hi Simon,

    I tried using this nice code in SQL Server 2005 but it fails with the message "Only functions and extended stored procedures can be executed from within a function".

    Same question: Is there a way to check file existence from a function? I have a table containing filenames and wish to perform a set based query to list missing files.

    I really hope I don't have to resort to using a cursor loop for this!

    Thanks in advance.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply