Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL
Message
De
11/09/2000 10:45:50
 
 
À
11/09/2000 10:37:44
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: SQL
Divers
Thread ID:
00414860
Message ID:
00414898
Vues:
19
>There won't be any NULLs without a LEFT JOIN. Otherwise it will only return those that have a matching record in the Orders table.
>
>
>SELECT ;
>    Orders.Id, ;
>    NVL(Clients.ClientName, PADR("Sir/Madam", nn)) AS ClientName ;
>    FROM Orders LEFT JOIN Clients ON Orders.Id = Clients.Order_id;
>    INTO CURSOR Temp ;
>    ORDER BY.....
There will if the client table has stored .NULL. in the name.
I assumed that was the situation, since you wouldn't need to have a "Dear Sir/Madam" for a customer that had no order...
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform