Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set relationship
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01593576
Message ID:
01593763
Views:
49
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform