4 Replies Latest reply on Mar 22, 2013 7:13 AM by Jamie Cannon

    Duplicate Serial Numbers

    Jamie Cannon ITSMMVPGroup

      Does anyone have a query within LDMS that will show any machines with duplicate serial numbers based on an Inventory scan?  Can this be done from a query or is it a SQL script?

       

      Thanks!

        • 1. Re: Duplicate Serial Numbers
          zman Master

          Should not really have dupe serial numbers for devices unless you have duplicate devices. Do you have dupe device turned on? Probaly can't do in LANDesk query unless you do a query with the serial number and export to csv and use excel dupe detection. You can try this in sql (caveat my sql is pretty crappy):

           

          SELECT "Computer"."Computer_Idn", "Computer"."DeviceName", "CompSystem"."Computer_Idn", COUNT("CompSystem"."SerialNum") AS "COUNT_SerialNum"

          FROM "DATABASENAME"."dbo"."Computer" "Computer"

          INNER JOIN "DATABASENAME"."dbo"."CompSystem" "CompSystem"

            ON "Computer"."Computer_Idn" = "CompSystem"."Computer_Idn"

          GROUP BY "Computer"."Computer_Idn", "Computer"."DeviceName", "CompSystem"."Computer_Idn"

          HAVING COUNT("CompSystem"."SerialNum") > 1

          • 2. Re: Duplicate Serial Numbers
            masterpetz ITSMMVPGroup

            Hi Jamie,

             

            I fear thats not possible through the LDIM console but with this select you should get all devicenames and serial numbers where the serialnumber exists more than once.

             

            SELECT SerialNumber, DeviceName FROM  Computer

            WHERE SerialNumber IN

            ( SELECT SerialNumber

            FROM Computer

            GROUP BY SerialNumber

            HAVING COUNT (*) > 1

            );

             

            Hope that helps.

             

            Regards

            Christian

             

             

             

             

             

             

             

             

             

            1 of 1 people found this helpful
            • 3. Re: Duplicate Serial Numbers
              masterpetz ITSMMVPGroup

              Damn, too slow...:-)

               

              Cheers

              Christian

              • 4. Re: Duplicate Serial Numbers
                Jamie Cannon ITSMMVPGroup

                Thanks everyone!  This is very good stuff.  I had to export it to Excel since they won't give me access to SQL.  There are currently 7 out of 1307 that have dup serial number.  4 of which are "To Be Filled by O.E.M".  Odd.