7 Replies Latest reply on Mar 28, 2012 3:47 AM by ServerSupportVocalink

    Creating a Query

    Rookie

      Hi Guys,

       

      I'm kind of new to LANDesk scene and im trying to famiiliarise myself with creating quries.. At the moment, I'm struggling to create a query to search for all LANDesk Clients that were last switched on/ or had an inventory scan 3 months ago. Any suggestions would be great

       

      Voca

        • 1. Re: Creating a Query
          Apprentice

          Two options if I understand you,

           

          One you can choose the Last Hardware Scan Date to use and choose a < or > option with a date that is three months previous to your currewnt date. So you might want dates older than Jan 27, 2012 for example. However, the date you put in is static, so as time goes by the query will get larger and larger as more dates could be included in this.

           

          Also under the OS option is a Last Start up Time, again same date issue, you would have to edit the date every week or so to keep it current, but that could work as well.

           

          Let me know if you need more help, I can post some screenshots as well.

           

          Brendan

          • 2. Re: Creating a Query
            Rookie

            Hi mate,

             

            Which 'Last Hardware Scan Date'  are we referring to? There are several you can find in Machine Components, whilst creating a query....

             

            Voca

            • 3. Re: Creating a Query
              Apprentice

              Voca,

               

              I use the one that if you look under a computer inventory is under the computer itself, not under any subsections. I have about 20 things there, including domain, full name, ID, and all the Last Dates. I use the Last Hardware Scan from there.

               

              Brendan

              • 4. Re: Creating a Query
                Rookie

                Cheers mate, thanks for your help.

                • 5. Re: Creating a Query
                  Apprentice

                  Another way to write a dynamic query might be to create your query like so:

                   

                  "Computer"."Last Hardware Scan Date" > "Getdate() - 90"

                   

                  This will give you all the machines with a "Last Hardware Scan Date" that is greater than 90 days each time you run the query.

                  1 of 1 people found this helpful
                  • 6. Re: Creating a Query
                    Apprentice

                    Really? I had no idea, will have to try that myself. Thanks for the info, thats much easier than changing it all the time!!

                     

                    Brendan

                     

                     

                    P.S. Just a note, this is how mine worked for anything not checked in for 15 days, Computer.Last Hardware Scan Date < Getdate() - 15

                     

                    Type the Getdate() - X into the edit values section, no quotes needed, it adds them for you.

                    • 7. Re: Creating a Query
                      Rookie

                      Wooow, Thanks Brednan and Serism, this query is smashing. . It's giving me the correct results that I'm looking for.