Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combine 5 tables to 1 cursor
Message
De
12/06/2018 11:24:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Combine 5 tables to 1 cursor
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01660692
Message ID:
01660692
Vues:
88
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 values (11,"test")

create cursor curSendTo ( id i, iemail i, iname i)
insert into curSendTo values (1,11,2)
insert into curSendTo values (2,11,1)

create cursor curSendCC ( id i, iemail i, iname i)
insert into curSendTo values (1,11,3)
insert into curSendTo values (2,11,6)

create cursor curSendBCC ( id i, iemail i, iname i)
insert into curSendTo 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

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?

Regards,

Koen
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform