Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SubQueries!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00515297
Message ID:
00515309
Vues:
17
I am afraid you will need to break it down. VFP Help says:

=================
SQL: Too many subqueries (Error 1805)

The number of subqueries allowed in Visual FoxPro is two per SELECT statement. For more information, see SELECT - SQL.
=================


>I am have a problem with the following sql statement. I get an sql error as follows: Too many subqueries. Is there a limitation in VFP6 on the amount of subqueries in a select statement and what is it? Is there a work around for this problem beyond braking the select up? Thanks for your help!
>
>SELECT names.* ;
> FROM money32!names ;
> WHERE (names.id IN ;
> (SELECT names.id ;
> FROM money32!names ;
> JOIN money32!contrib ON names.id = contrib.id ;
> JOIN money32!bluebook ON contrib.source_key = bluebook.key ;
> JOIN money32!fund ON bluebook.fund_key = fund.key ;
> JOIN money32!letter ON bluebook.letter_key = letter.key ;
> JOIN money32!summary ON names.id = summary.id ;
> JOIN money32!memdata ON summary.mem_key = memdata.key ;
> JOIN money32!nameinfo ON names.id = nameinfo.id ;
> JOIN money32!pledge ON names.id = pledge.id ;
> WHERE pledge.pledgebal > 1 ;
> AND summary.hpcamt > 5 ;
> AND UPPER(letter.letter) LIKE "E%" ;
> AND UPPER(bluebook.source) LIKE "A%" ;
> AND UPPER(fund.fund) LIKE "D%" ;
> AND summary.ytdamt > 5 ;
> AND UPPER(memdata.memdesc) LIKE "C%" ;
> AND UPPER(nameinfo.email) <> SPACE(LEN(UPPER(nameinfo.email))) ) ) ;
> AND (names.deleteflag # 1) ;
> AND PADR(names.id,LEN(MainQuery.id)," ") NOT IN (SELECT id FROM MainQuery) ;
> GROUP BY names.id ;
> INTO CURSOR SQL_Query
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform