Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check for file exists on the SQL server from a store procedure 2

Status
Not open for further replies.

tbscmgi

MIS
Sep 17, 2003
66
US
To All-
How can I check to see if a certain file exists on the SQL server from a store procedure.

I have a store procedure that create a file if number of row is > 0.

What I'm doing is schedule the store procedure to run from 6:00 AM thru 8:00 AM every 30 minute. I what it to only run if the file does not exists on the server.

Thank for any help.
Tony
 
I always recommend the xp_fileexists method. The other two methods are overkill as Microsoft has provided a stored procedure which can do the work from a single command.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Denny - I was looking for that one the other day, but I was looking for sp_fileexists instead [blush]

Guess its' good to know I was not crazy (for thinking such a proc existed anyways)

[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top