>strategies after targets, but I'd switch to a general "send" cursor with a "how" field filled with code to signify [TO, CC, BCC]
>which is identical to the union of the 3 send-cursors with target field for alternative 1...
>
>>Hi,
>>
>>I am struggling to construct one cursor from 5 tables
>>
>>Table with content
>>
>>create cursor curnames (id i, name c(10), email c(10))
>>insert into curNames values (1,"koen","
koen@gmail.com")
>>insert into curNames values (2,"john","
john@gmail.com")
>>insert into curNames values (3,"rob","
rob@gmail.com")
>>insert into curNames values (4,"bill","
bill@gmail.com")
>>insert into curNames values (5, "annet", "
annet@gmail.com")
>>insert into curNames values (6, "maria", "
maria@gmail.com")
>>
>>create cursor curEmail ( id i, content c(10))
>>insert into curEmail fields( id, content) values (11,"test")
>>
>>create cursor curSendTo ( id i, iemail i, iname i))
>>insert into curSendTo fields (id, iemail, iname) values (1,11,2)
>>insert into curSendTo fields (id, iemail, iname) values (2,11,1)
>>
>>create cursor curSendCC ( id i, iemail i, iname i))
>>insert into curSendCC fields (id, iemail, iname) values (1,11,3)
>>insert into curSendCC fields (id, iemail, iname) values (2,11,6)
>>
>>create cursor curSendBCC ( id i, iemail i, iname i))
>>insert into curSendBCC fields (id, iemail, iname) values (1,11,4)
>>
>>would like to have a cursor showing:
>>
>>cursendEmail
>>either
>>((fields: Name,email,content,send))
>>John,john@gmail.com,test,sendto
>>Koen,koen@gmail.com,sendto
>>Rob,rob@gmail.com,test,sendcc
>>Maria,maria@gmail.com,sendcc
>>Bill,bill@gmail.com,sendbcc
>>
>create a UNION of all inner joins of the 3 send tables wth first 2 tables where origin table fills last field
>
>>or
>>
>>(( fields: Name, iemail, content, sendto, sendcc, sendbcc))
>>John,11,Test,.t.,.f.,.f.
>>Koen,11,Test,.t.,.f.,.f.
>>Rob,11,Test,.f.,.t.,.f.
>>Maria,11,Test,.f.,.t.,.f.
>>Bill,11,Test,.f.,.f.,.t.
>>Somebody to assist me?
>
>create UNION of all combinations of cursors 1+2 found in send cursors with dummy send fields an run update statements,
>updates needed to allow distinct handling of UNION
>
>>
>>Regards,
>>
>>Koen
Thomas,
your solution 1 works OK for my first requirement and adapted a little bit with 3 extra fields which to be set .T. or .F. it also works for my second requirement. I find your solution 1 better than 2 with updating.
Thanks!
Regards,
Koen