Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correlated Subqueries not allowed in views?
Message
De
20/01/1999 12:53:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00177885
Message ID:
00178125
Vues:
28
For everyone who had a look at this -- thanks.

The problem was my UDF DaysToPaid(). When I removed it and replaced it with simple and straightforward subtraction the query worked. Now to fine tune.

Again I learn the KISS lesson (butthe UDF looked so nice).

Thanks to all

>Please have a look at the lines marked with "$". VFP returned the error "This type of query not allowed" when I tried to open the view. Does that refere to the subquery?
>Is this type of subquery allowed in views in 6.0?
>
>Thanks - Miles Thompson
>
>create sql view lv_intcalcsource as ;
>select InvHead.cinvoi_key, ;
> <snip>
> InvHead.cPenRevAcc ;
> from hea!InvHead inner join hea!Company ;
> on InvHead.cCompa_Key = Company.cCompa_Key ;
> where ;
> ( DaysToPaid() > IntCalc.ic_days .and. .not. lFullyPaid ) ;
> .or. ;
> ( lFullyPaid .and. ;
> ceiling( (DaysToPaid() - IntCalc.ic_days) / 30 ) + 1 > ;
>$ (select count(*) ;
>$ from InterestDetails ;
>$ where InvHead.cInvoi_Key = cDet_InvoiKey) ) ;
> order by Company.cCompanyName, InvHead.dCompletionDate
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform