?
Solved

report in sms 2007

Posted on 2011-03-15
3
Medium Priority
?
462 Views
Last Modified: 2013-11-21
I have a report that has the following sql info, it pulls data but I want to make sure I'm not missing something here.  I am looking for files on 2 servers, pst files, files that are within 5 days of the current date. Using gs-softwarefile and the modified date.
I see in other research they say to use the WHERE clause with the date search but if I put in where instead of AND it returns an error when I try to save the statement.
Comments?
Thank you,
Sarah

select SYS.Netbios_Name0, SF.FileName, SF.FileSize, SF.FilePath,  SF.ModifiedDate
From v_GS_SoftwareFile SF
join v_R_System SYS on SYS.ResourceID = SF.ResourceID
Where SF.FileName LIKE '%.pst' and (SYS.Netbios_Name0 LIKE 'dotscn21' or SYS.Netbios_Name0 LIKE 'dotscn20') and (DATEDIFF(day, SF.ModifiedDate, GetDate()) < 5)
ORDER BY SF.FileSize
0
Comment
Question by:sarahs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Assisted Solution

by:jamie77777
jamie77777 earned 200 total points
ID: 35176535
Hi Sarah, am finding it hard to get what you're asking.

You're query appears to work fine as you have it.  In regards to 'but if I put in where instead of AND it returns...'. you can only have one WHERE in the statement, unless you start 'sub-querying', which i don't see any value in.
0
 

Accepted Solution

by:
sarahs earned 0 total points
ID: 35180219
Thanks for the input, it seems to be an issue with the amount of data that is being inventoried to start with.  The query is working fine, but thank you for the input.

Sarah
0
 

Author Closing Comment

by:sarahs
ID: 35221124
jamie77777 gets the points for the comment
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question