SMS data and dates

I am looking to see what version of a program is installed across our network.  How can I select only the most recent data in SMS?  
My query:
SELECT
sys.name0 [Redtag],
sf.filename [File],
sf.fileversion [Vsn],
R.user_Name0 as LastUser,
r.creation_date0 as [Date]
FROM dbo.SoftwareFile AS sf
INNER JOIN dbo.SoftwareInventory AS si ON sf.FileId = si.FileId
INNER JOIN dbo.v_GS_System AS SYS on sys.resourceid = si.clientid
INNER JOIN dbo.v_R_System AS R on R.resourceid = si.clientid
where sf.filename = 'HSSTIMESTUDY.EXE'
order by sys.name0, r.creation_date0

I get this:
Redtag                       File                        Vsn                  LastUser      Date
ITSD-VM2-318648      HssTimeStudy.exe      1.02.0005      T0189      2010-02-20 12:11:10.000
ITSD-VM2-318648      HssTimeStudy.exe      1.02.0006      T0189      2010-03-05 14:08:25.000

I only want a single row returned for a given RedTag.  In the example I want the 2nd line since that appears to be later information.
IBMJunkmanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tigin44Commented:
SELECT
sys.name0 [Redtag],
sf.filename [File],
sf.fileversion [Vsn],
R.user_Name0 as LastUser,
r.creation_date0 as [Date]
FROM dbo.SoftwareFile AS sf
INNER JOIN dbo.SoftwareInventory AS si ON sf.FileId = si.FileId
INNER JOIN dbo.v_GS_System AS SYS on sys.resourceid = si.clientid
INNER JOIN dbo.v_R_System AS R on R.resourceid = si.clientid
where sf.filename = 'HSSTIMESTUDY.EXE'
and r.creation_date0 = (SELECT MAX(creation_date0 FROM dbo.v_R_System ))
order by sys.name0, r.creation_date0

0
IBMJunkmanAuthor Commented:
No go.  Get empty results.  SELECT MAX(creation_date0) FROM dbo.v_R_System return 1 record  2011-04-06 13:38:18.000
It appears there are no records in dbo.v_R_System with that date that match records in dbo.SoftwareInventory.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IBMJunkmanAuthor Commented:
Gave up.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.