I created 2 cursors:
CREATE CURSOR c2 (id1i,id i,flag l)
CREATE CURSOR c2 (id1 i,id i,flag l)
c1:
Id Seq Excludeit
1 1 T
2 2 F
3 3 T
4 1 T
5 2 F
6 3 T
7 1 F
8 2 F
9 3 T
10 1 F
11 3 T
c2:
Id Seq Excludeit
1 1 T
2 2 F
3 3 T
4 1 T
5 2 F
6 3 T
7 1 F
8 2 F
9 3 T
10 1 F
11 3 T
the statement:
SELECT c1.id,seq,c2.id1,excludeit;
FROM c1;
inner JOIN c2 ;
ON c1.id = c2.id ;
WHERE seq=1 AND NOT excludeit ORDER BY 1,3
works for me with the resultset:
Id Seq Id1 Excludeit
7 1 12 F
the statement:
SELECT c1.id,seq,c2.id1,excludeit;
FROM c1;
inner JOIN c2 ;
ON c1.id = c2.id ;
WHERE seq=1 AND excludeit ORDER BY 1,3
works for me also with the resultset:
Id Seq Id1 Excludeit
1 1 1 T
1 1 5 T
1 1 8 T
1 1 10 T
4 1 4 T
What are the problems you see??
Peter
>Perhaps someone can help me with this Select SQL statement.
>
>What I am after is this: if MyParent.the_seq = 1, then I want it included in the cursor. However, if MyParent.excludeit = .f. then I do not want it included in the cursor.
>
>The following doesn't give the correct results
>
>
>SELECT *;
> FROM appdata!MyParent ;
> INNER JOIN appdata!MyChild ;
> ON MyParent.idnumber = MyChild.idnumber;
> WHERE MyParent.the_seq = 1 ;
> AND MyParent.excludeit = .f.
>
>Any help is appreciated.
>
>Mel Cummings
Peter Cortiel