Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - too many subqueries
Message
De
23/01/2006 22:05:15
 
 
À
23/01/2006 20:58:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01089549
Message ID:
01089631
Vues:
26
Hilmar
Yes it is for a report. I thought about that and that will be my fall back position if is not using the wrong version of the EXE.

Thanks
Gaylen

>If it is for a report, perhaps you can divide the query into smaller pieces? (Join a few tables, join the result with one or more additional tables.) This might also help make the query faster.
>
>>I am getting the following error on some of the computerer at my client's office. I am using VFP9. Only a few of the computers are having problems with this query.
>>
>>
>>   Too many subqueries.
>>
>>
>>
>>The offending code is:
>>
>>
>>
>>Select a.sif_no, b.insured, a.pol_status As pol_st_old,b.pol_status As pol_st_new, ;
>>	a.est_prem, o.exp_mod As exp_mod_pct , b.incep_date, ;
>>	NVL(e.PCT,0)As PCT , Nvl(F.Cnt,0) As NSF, Nvl(g.cancel_cnt,0) As no_pays, ;
>>	a.agent_no, h.agent_status,Nvl(a.ctp,.F.)As ctp,Nvl(a.consent_rate,.F.) As consent_rate ;
>>	,Nvl(i.flag7500,"    ")As flag_7500 , Nvl(i.res_premium,000000) As res_7500_prem, ;
>>	NVL(j.res_premium,00000) As res_3000_prem, Nvl(j.flag3000,"    ") As flag_3000 , ;
>>	NVL(a.other_flag,"    ") As other_flag , Nvl(a.other_pct,0) As other_pct ,;
>>	NVL(k.lr_pct,0) As lr_pct , Nvl(l.cnt50000,0) As cnt50000  , Nvl(m.lr_policy,00000.0)As lr_policy, ;
>>	NVL(N.frequency,0000) As frequency,  ;
>>	IIF(Empty(a.safety_pct)  ," ","Y") As drugfree_cr,IIF(Empty(a.drugfree_pct)  ," ","Y") As safety_cr, ;
>>	IIF(Empty(a.fccpap_pct)  ," ","Y") As fccpap_cr, ;
>>	ICASE(a.limit1 = "500000","2",a.limit1 = "1000000","3"," ") As limits, Iif(a.bill_method = "2","Y", " ") As msa, ;
>>	00 As sort_order, a.ctr_pct, a.ctp_ann, 000 As scorecard,Space(4) As star_lr ,Space(1) As star_50000, ;
>>	SPACE(1) As star_freq,Space(1) As star_no_pay,Space(1) As star_nsf,Space(1) As star_exp_Mod,Space(1) As star_audit, ;
>>	SPACE(1) As star_7500,Space(1) As star_3000,Space(1) As star_unappr ;
>>	From tmpPolicy a ;
>>	LEFT Join h:\ps_vfp\Master b On a.sif_no = b.sif_no ;
>>	LEFT Join tmpAudit e On a.sif_no = e.sif_no ;
>>	LEFT Join tmprtn_ck F On a.sif_no = F.sif_no ;
>>	LEFT Join tmpcancels g On a.sif_no = g.sif_no  ;
>>	LEFT Join tmpagents h On a.agent_no = h.agent_no ;
>>	LEFT Join tmp_7500 i On a.sif_no = i.sif_no ;
>>	LEFT Join tmp_3000 j On a.sif_no = j.sif_no ;
>>	LEFT Join tmplr_agent k On a.agent_no = k.agent_no ;
>>	LEFT Join tmp50000  l On  a.sif_no = l.sif_no ;
>>	LEFT Join tmplr_policy m On a.sif_no = m.sif_no ;
>>	LEFT Join tmpfrequency N On a.sif_no = N.sif_no ;
>>	LEFT Join tmpExp_mod o On a.sif_no = o.sif_no ;
>>	Into Cursor tmpagg Readwrite
>>
>>
>>Anyone have any ideas why this creates an error in some of the computers and not the other. This is a VFP 9 application.
>>Thanks
>>
>>Gaylen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform