This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SQL REQUEST

Bonjour

 

Je voudrais appliquer une requete qui  me permettrai me donnant les informations sur les postes de travail afin d'aliementer un tableau de bord dans ma societé.

J'ai reussi a recuperer tous les élément sauf le statut de mise a jour " OUI/NON" présent dans le Dashboard

La requete est la suivante :

 

select distinct Name, OperatingSystem =

CASE

   When OperatingSystem = '9' then 'Windows 2003'

   When OperatingSystem = '34' then 'Windows 2008 R2'

   When OperatingSystem = '18' then 'Windows 2008'

   When OperatingSystem = '36' then 'Windows 2012'

   when OperatingSystem = '39' then 'Windows 2012 R2'

   When OperatingSystem = '41' then 'Windows 2016'

end,

SAVVersion,DomainName, convert(varchar,LastScanDateTime,103) LastScanDateTime, LastScanName

from [dbo].[Computers] c,[Sophos Reporting Interface].[vPolicyComplianceData] vp

where

vp.ComputerID = c.ID

Pouvez vous me dire comment faire pour récuperer le champs "A jour" ?

 

Merci d'avance

 



This thread was automatically locked due to age.
Parents
  • Hello Gill Affoum,

    while my French is good enough to read your post it isn't when it comes to replying, I hope English is ok.

    Please see Jak's reply in this Sophos Reporting thread. Haven't tested if it still works, I assume it does - if not it should give you nevertheless enough information to come up with a solution.

    Christian

  • I have to create a script for a tool that get information directly from SQL database. The different section for this report is :

    Name, OperatingSystem, SAVVersion, LastScanDateTime, LastScanName, UpToDate

    With the following script, i can get all informaion execpt "UpToDate"

     

    Could someone please help me to get this information from the DB. I think i must join several table to get this info but i don't know which ones.

     

    the actuel script without the section "UpToDate"

    select distinct Name, OperatingSystem =

     CASE

      When OperatingSystem = '9' then 'Windows 2003'

      When OperatingSystem = '34' then 'Windows 2008 R2'

      When OperatingSystem = '18' then 'Windows 2008'

      When OperatingSystem = '36' then 'Windows 2012'

      When OperatingSystem = '39' then 'Windows 2012 R2'

      When OperatingSystem = '41' then 'Windows 2016'

    end,

    SAVVersion,DomainName, convert(varchar,LastScanDateTime,103) LastScanDateTime, LastScanName

    from

      [dbo].[Computers] c,[Sophos Reporting Interface].[vPolicyComplianceData] vp

    where

      vp.ComputerID = c.ID

Reply
  • I have to create a script for a tool that get information directly from SQL database. The different section for this report is :

    Name, OperatingSystem, SAVVersion, LastScanDateTime, LastScanName, UpToDate

    With the following script, i can get all informaion execpt "UpToDate"

     

    Could someone please help me to get this information from the DB. I think i must join several table to get this info but i don't know which ones.

     

    the actuel script without the section "UpToDate"

    select distinct Name, OperatingSystem =

     CASE

      When OperatingSystem = '9' then 'Windows 2003'

      When OperatingSystem = '34' then 'Windows 2008 R2'

      When OperatingSystem = '18' then 'Windows 2008'

      When OperatingSystem = '36' then 'Windows 2012'

      When OperatingSystem = '39' then 'Windows 2012 R2'

      When OperatingSystem = '41' then 'Windows 2016'

    end,

    SAVVersion,DomainName, convert(varchar,LastScanDateTime,103) LastScanDateTime, LastScanName

    from

      [dbo].[Computers] c,[Sophos Reporting Interface].[vPolicyComplianceData] vp

    where

      vp.ComputerID = c.ID

Children