Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
smokin5s
Starting Member
1 Post |
Posted - 2008-01-16 : 16:03:47
|
This is a SQL question while using Microsoft SMS.I am trying to write a SQL query looking for a specific file in a specific directory. If the File does not exist, then I want it to display.here is the Code that I have for it that shows that the file exists... how do I make it show that the file doesn't exist?... what am I doing wrong?**********************************SELECT TOP 100 PERCENT SYS.Netbios_Name0, SYS.User_Name0, SF.FileName, SF.FileVersion, SF.FileSize, SF.FileModifiedDate, SF.FilePath, SYS.Operating_System_Name_and0FROM dbo.v_GS_SoftwareFile SF INNER JOIN dbo.v_R_System SYS ON SYS.ResourceID = SF.ResourceIDWHERE (SF.FileName = 'UdaterUI.exe') AND (SF.FilePath = 'C:\Program Files\McAfee\Common Framework\') OR (SF.FileName = 'UdaterUI.exe') AND (SF.FilePath = 'c:\Program Files\Network Associates\Common Framework\')ORDER BY SF.FileVersion, SYS.Netbios_Name0 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-17 : 01:13:42
|
See what happens if you use SF.FilePath <> instead of SF.FilePath =MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|