Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help to build a query with inners, left, right or full joins
Message
De
15/06/2004 14:28:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Help to build a query with inners, left, right or full joins
Divers
Thread ID:
00913984
Message ID:
00913984
Vues:
45
hello, i'm having a problem with this query:
SELECT Llamadas.numero AS numero, Llamadas.fllamada AS fllamada,;
  Llamadas.fatencion AS fatencion, Llamadas.fcierre AS fcierre,;
  Llamadas.estado AS estado, Llamadas.host AS host,;
  Llamadas.modelo AS modelo, Llamadas.undhard AS hardware,;
  Llamadas.usuario AS usuario, Llamadas.reporta AS usunombre,;
  Oficina.nombre AS ofinombre, Llamadas.piso AS piso,;
  Llamadas.ingeniero AS ingeniero, Ingeniero.nombre AS ingnombre,;
  Llamadas.servicio AS codservicio,;
  Sub_unidades.descripcion AS categoria,;
  Dispositivo.descripcion AS disnombre, "1" AS temporal,;
  (IIF(EMPTY(fcierre),"ABIERTA","CERRADA")) AS autoestllamadas,;
  Llamadas.tatencion AS tatencion, Llamadas.tsolucion AS tsolucion;
 FROM  helpdesk!llamadas LEFT JOIN helpdesk!sub_unidades;
    LEFT JOIN helpdesk!ingeniero;
    LEFT JOIN helpdesk!dispositivo;
    LEFT JOIN helpdesk!oficina;
    LEFT JOIN helpdesk!usuarios_cia ;
   ON  Llamadas.usuario = Usuarios_cia.codigo ;
   ON  Llamadas.oficina = Oficina.codigo ;
   ON  Llamadas.dispositivo = Dispositivo.codigo ;
   ON  Llamadas.ingeniero = Ingeniero.codigo ;
   ON  Llamadas.servicio = Sub_unidades.codigo;
 GROUP BY Llamadas.numero;
 ORDER BY Llamadas.numero
The problem is with the joins in ingeniero(engineer) and oficina(office) where always displays the same record and that's not true because i found diferents values for both.

How can i solve this, Please.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform