Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql select to remove blank fields
Message
De
15/07/2019 11:07:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/07/2019 11:00:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01669607
Message ID:
01669613
Vues:
86
>
>The ID in the resulting table should be a new distincst ID, if possible.
>Regards,
>Koen

IOW Ids are not used.
Select t1.field1, t2.field2, t3.field3, nvl(t1.group, Nvl(t2.group, t3.group)) as group, sys(2015) as newId ;
from (Select field1, group ;
from Table1 ;
where !Empty(field1)) t1 ;  
full join (Select field2, group ;
from Table1 ;
where !Empty(field2)) t2 on t1.group = t2.group ;
full join (Select field3, group ;
from Table1 ;
where !Empty(field3)) t3 on Nvl(t1.group, t2.group) = t3.group
Ç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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform