Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The dreaded OUTER,INNER,LEFT,RIGHT join question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00337397
Message ID:
00337568
Vues:
14
Nick,
>>>
>>>>That worked, the interesting thing is that .NULL. is returned in child table fields. So I will have to work with that. The other thing I saw was that it was not very fast in relation to a regular not outer join SQL.
>>>
>>>You *can* use ISNULL() in the SQL statement if you must force certain fields to a value other than NULL for missing child records. For example with a 6-char field1 in your y table that you want to show "NONE " if null:
SELECT x.field1, ;
>>>       IIF(ISNULL(y.field1), "NONE  ", y.field1) AS detail ; ....
or select to a table and loop thru to change the values, or handle it in the report writer, or ..... (lots of ways for a Fox to skin a cat)
>>
>>Since I hate cats I dont mind skinny a few for the purpose of better code and reports.
>>
>
>Often, when I prepare the report cursor I make it updatable to do more processing and that's usually the place where I
>
>REPLACE ALL y_field1 WITH 0 FOR ISNULL(y_field1)
>
This automatically means that y_field is numeric... But what if you select * (~60 and more) fields and don't know the type yet? My colleague created an elegant program for handling this situation...
My original idea was to create an array of fields and then replace appropriately...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform