Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make a remote view with SQL?
Message
From
04/09/2001 04:49:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/09/2001 15:31:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00551736
Message ID:
00551969
Views:
25
>>
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
Previous
Reply
Map
View

Click here to load this message in the networking platform