Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select not empty fields
Message
De
10/09/2005 05:30:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/09/2005 04:14:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01048372
Message ID:
01048377
Vues:
16
>Dear Experts
>
>Table1 has twenty fields and only five fields have data, the rest fifteen
>fields are empty.
>
>I want to select !empty() fields alongwith data into a cursor.
>
>What Select Statement should I use?
>
>Please help

Tariq,
Your question is not clear. Might be one of these:

select f1,f2,f3,f4,f5 from myTable

select f1,f2,f3,f4,f5 from myTable where ;
!empty(f1) and ;
!empty(f2) and ;
!empty(f3) and ;
!empty(f4) and ;
!empty(f5)

select f1,f2,f3,f4,f5 from myTable where ;
!empty(f1) or ;
!empty(f2) or ;
!empty(f3) or ;
!empty(f4) or ;
!empty(f5)

empty() is not rushmore optimizable. You'd want to replace it with comparison operator supplying 'empty' value depending on datattype. ie:

select f1,f2,f3,f4,f5 from myTable where ;
!(f1 == '') or ;
!(f2 == '') or ;
!(f3 == '') or ;
f4 != {} or ;
f5 != 0

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