Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make a remote view with SQL?
Message
De
04/09/2001 04:49:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/09/2001 15:31:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00551736
Message ID:
00551969
Vues:
24
>>
select a.field1, a.field2, ;
>> b.field3, b.field4 ;
>> from tableA A ;
>> left join tableB B ;
>>   on a.field1 = b.field1 and ;
>>   a.field2 = b.field2
>>
>>*or NULLS replaced with 0
>>
>>select a.field1, a.field2, ;
>> <b>nvl(b.field3,0)</b> as 'field3', ;
>> <b>nvl(b.field4,0)</b> as 'field4' ;
>> from tableA A ;
>> left join tableB B ;
>>   on a.field1 = b.field1 and ;
>>   a.field2 = b.field2
>
>Exactly what I would have done. The only slight modification I'd suggest is to use nvl() instead of the iif(isnull()), it works the same but is more lightweight than the combination of two functions. Depending on the number of records pulled at a time this may or may not mean a difference in speed.

You're absolutely right Dragan :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform