Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many tables allowed in sql from clause?
Message
De
17/07/2002 15:31:41
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
How many tables allowed in sql from clause?
Divers
Thread ID:
00679746
Message ID:
00679746
Vues:
55
I'm getting some strange results in large SQL query involving several tables. I created my "joins" in the from/where clauses because of the limitation of 9 joins in VFP. Anyone know how many tables are allowed in the sql "from" clause? I get 'column ccityid not found' the first time I run this prg. The second time I run it, I don't get an error.

SET SAFETY off
SET EXCLUSIVE off
lcDataLocation = 'F:\DEVELOP\edwin\data\'
lcCommonDataLocation = 'F:\DEVELOP\edwin\data\CommonData\'
SELECT ;
student.CFIRSTNAME,;
student.CFORMERNME,;
student.CGENDER,;
student.CGRADE,;
student.CID,;
student.CISBEID,;
student.CLASTNAME,;
student.CMEDICAID,;
student.CMIDNAME,;
student.CSITEID,;
student.CSSN,;
student.DDOB,;
student.CC1ADDR1,;
student.CC1ADDR2,;
cc1city.ccity as cc1citynam,;
student.CC1EMAIL,;
student.CC1FFRST,;
student.CC1FLAST,;
student.CC1FSALUT,;
student.CC1MFRST,;
student.CC1MLAST,;
student.CC1MSALUT,;
student.CC1PHONE1,;
student.CC1PHONE2,;
student.CC1PHONE3,;
lutcc1rel.cdescription as cc1relatio,;
student.CC2ADDR1,;
student.CC2ADDR2,;
cc2city.ccity as cc2citynam,;
student.CC2EMAIL,;
student.CC2FFRST,;
student.CC2FLAST,;
student.CC2FSALUT,;
student.CC2MFRST,;
student.CC2MLAST,;
student.CC2MSALUT,;
student.CC2PHONE1,;
student.CC2PHONE2,;
student.CC2PHONE3,;
lutcc2rel.cdescription as cc2relatio,;
student.CC3ADDR1,;
student.CC3ADDR2,;
cc3city.ccity as cc3citynam,;
student.CC3EMAIL,;
student.CC3FFRST,;
student.CC3FLAST,;
student.CC3FSALUT,;
student.CC3MFRST,;
student.CC3MLAST,;
student.CC3MSALUT,;
student.CC3PHONE1,;
student.CC3PHONE2,;
student.CC3PHONE3,;
lutcc3rel.cdescription as cc3relatio,;
attecity.ccity as attendcity,;
attescho.cattendname as attendschool,;
homecity.ccity as homecity,;
homescho.cattendname as homeschool,;
student.CDCFSCASE,;
student.CSPADDR1,;
student.CSPADDR2,;
student.CSPBUSPH,;
student.CSPCITYID,;
student.CSPFRSTNME,;
student.CSPHOMEPH,;
student.CSPLASTNME,;
student.DDCFSUPDT,;
student.DMEDUPDATE,;
student.DSPAPPOINT,;
student.LACTIVE,;
student.LMEDAUTOUP,;
student.MMEMO10,;
student.MMEMO11,;
student.MMEMO12,;
student.MMEMO5,;
student.MMEMO6,;
student.MMEMO7,;
student.MMEMO8,;
student.MMEMO9;
from;
(lcDataLocation + 'student.dbf'),;
(lcDataLocation + 'attend.dbf') as attescho,;
(lcDataLocation + 'attend.dbf') as homescho,;
(lcCommonDataLocation + 'city.dbf') as attecity,;
(lcCommonDataLocation + 'city.dbf') as homecity,;
(lcCommonDataLocation + 'city.dbf') as cc1city,;
(lcCommonDataLocation + 'city.dbf') as cc2city,;
(lcCommonDataLocation + 'city.dbf') as cc3city,;
(lcCommonDataLocation + 'lut.dbf') as lutcc1rel,;
(lcCommonDataLocation + 'lut.dbf') as lutcc2rel,;
(lcCommonDataLocation + 'lut.dbf') as lutcc3rel;
where;
attescho.cid = student.catndschid;
and attecity.cid = attend.ccityid;
and cc1city.cid = student.cc1cityid;
and cc2city.cid = student.cc2cityid;
and cc3city.cid = student.cc3cityid;
and homecity.cid = attend.ccityid;
and homescho.cid = student.chomeschid;
and lutcc1rel.cid = student.cc1relid;
and lutcc2rel.cid = student.cc2relid;
and lutcc3rel.cid = student.cc3relid;
into table (lcDataLocation + 'ffsgen.dbf')
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform