Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL
Message
From
11/09/2000 10:45:50
 
 
To
11/09/2000 10:37:44
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: SQL
Miscellaneous
Thread ID:
00414860
Message ID:
00414898
Views:
21
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform