You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-01-25 12:11:31

falco2001
Member
Registered: 2016-02-11
Posts: 256

[Résolu][10.0.5] requêtes fusion vers glpiinventory

Bonjour,
j'ai ceci

SELECT DISTINCT
    UPPER(B.name), A.remote_addr, E.last_contact
FROM
    glpi_plugin_fusioninventory_inventorycomputercomputers AS A
        LEFT JOIN
    glpi_computers AS B ON A.computers_id = B.id
        LEFT JOIN
    glpi_items_operatingsystems AS C ON C.items_id = B.id
        LEFT JOIN
    glpi_operatingsystems AS D ON D.id = C.operatingsystems_id
        LEFT JOIN
    glpi_plugin_fusioninventory_agents AS E ON E.computers_id = A.computers_id

savez-vous comment ceci se reformule en glpiinventory ou avez-vous un schéma des changements fusion vers glpiinventory.
Merci beaucoup

Last edited by falco2001 (2023-01-25 17:21:49)

Offline

#2 2023-01-25 17:08:00

falco2001
Member
Registered: 2016-02-11
Posts: 256

Re: [Résolu][10.0.5] requêtes fusion vers glpiinventory

re,
j'avance un peu.
SELECT * FROM `glpi-aa-new`.glpi_operatingsystems;

SELECT DISTINCT
    UPPER(B.name), B.last_inventory_update, A.name
FROM
    glpi_computers AS B
        LEFT JOIN
    glpi_entities ON (B.entities_id = glpi_entities.id)
        LEFT JOIN
    glpi_computermodels ON (B.computermodels_id = glpi_computermodels.id)
        LEFT JOIN
    glpi_items_operatingsystems ON (B.id = glpi_items_operatingsystems.items_id
        AND glpi_items_operatingsystems.itemtype = 'Computer')
        LEFT JOIN
    glpi_operatingsystems ON (glpi_items_operatingsystems.operatingsystems_id = glpi_operatingsystems.id)
        LEFT JOIN
    glpi_locations ON (B.locations_id = glpi_locations.id)
        LEFT JOIN
    glpi_computertypes ON (B.computertypes_id = glpi_computertypes.id)
        LEFT JOIN
    glpi_states ON (B.states_id = glpi_states.id)
        LEFT JOIN
    glpi_ipaddresses AS A ON (B.id = A.mainitems_id
        AND A.mainitemtype = 'Computer'
        AND A.is_deleted = '0'
        AND NOT (A.name = ''))
        LEFT JOIN
    glpi_agents ON (B.id = glpi_agents.items_id
        AND glpi_agents.itemtype = 'Computer')

Last edited by falco2001 (2023-01-25 17:10:58)

Offline

#3 2023-01-25 17:21:30

falco2001
Member
Registered: 2016-02-11
Posts: 256

Re: [Résolu][10.0.5] requêtes fusion vers glpiinventory

ok
avec :

SELECT DISTINCT
    UPPER(B.name), B.last_inventory_update,  A.name
FROM
    glpi_computers AS B
        LEFT JOIN
    glpi_entities ON (B.entities_id = glpi_entities.id)
        LEFT JOIN
    glpi_computermodels ON (B.computermodels_id = glpi_computermodels.id)
        LEFT JOIN
    glpi_items_operatingsystems ON (B.id = glpi_items_operatingsystems.items_id
        AND glpi_items_operatingsystems.itemtype = 'Computer')
        LEFT JOIN
    glpi_operatingsystems AS D ON (glpi_items_operatingsystems.operatingsystems_id = D.id )
        LEFT JOIN
    glpi_locations ON (B.locations_id = glpi_locations.id)
        LEFT JOIN
    glpi_computertypes ON (B.computertypes_id = glpi_computertypes.id)
        LEFT JOIN
    glpi_states ON (B.states_id = glpi_states.id)
        LEFT JOIN
    glpi_ipaddresses AS A ON (B.id = A.mainitems_id
        AND A.mainitemtype = 'Computer'
        AND A.is_deleted = '0'
        AND NOT (A.name = ''))
        LEFT JOIN
    glpi_agents ON (B.id = glpi_agents.items_id
        AND glpi_agents.itemtype = 'Computer')

Offline

Board footer

Powered by FluxBB