Solved

report in sms 2007

Posted on 2011-03-15
3
444 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
  • 2
3 Comments
 

Assisted Solution

by:jamie77777
jamie77777 earned 50 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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