Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set relationship
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01593576
Message ID:
01593763
Vues:
48
>After a break, this has me in the ballpark. Thank you
>
>
>select  ;
>t1.RatingMax	as t1MAX,;
>t2.RatingMax	as t2MAX,;
>t3.RatingMax	as t3MAX,;
>NVL(T1.RatingMax,0) + NVL(T2.RatingMAX,0) + NVL(T3.RatingMAX,0) as SumMAXs, ;
>NVL(T1.yyMMddhh, T2.yyMMddhh)  AS yyT2		,;
>NVL(T1.yyMMddhh, T3.yyMMddhh)  AS yymmddhh	;
>FROM T1	 ;
>FULL JOIN  T2	;
>FULL JOIN  T3	;
>ON T1.yymmddhh = T2.yymmddhh;
>ON T1.yymmddhh = T3.yymmddhh
>
I usually put JOIN conditions right after the JOIN. Also, I think you need double NVL instead, e.g.
>select  ;
>t1.RatingMax	as t1MAX,;
>t2.RatingMax	as t2MAX,;
>t3.RatingMax	as t3MAX,;
>NVL(T1.RatingMax,0) + NVL(T2.RatingMAX,0) + NVL(T3.RatingMAX,0) as SumMAXs, ;
>NVL(NVL(T1.yyMMddhh, T2.yyMMddhh), T3.yymmddhh)  AS yymmddhh	;
>FROM T1	 ;
>FULL JOIN  T2	;
ON T1.yymmddhh = T2.yymmddhh;
>FULL JOIN  T3	;
>ON T1.yymmddhh = T3.yymmddhh
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform