Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select not empty fields
Message
From
10/09/2005 05:30:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/09/2005 04:14:04
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01048372
Message ID:
01048377
Views:
17
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform