>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