Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPDATE question
Message
From
20/08/2009 07:51:12
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01419198
Message ID:
01419208
Views:
139
Sergey,

thank you very much. Looks I like I need to update myself. The form UPDATE Alias SET .. FROM .. AS ALias seems to solve some of my problems

Agnes

>
>UPDATE t0 SET n1 = tm.n1m ;
>	FROM (lcCur) t0 JOIN ( ;
>		SELECT t1.m1, t1.m2, MAX(t1.n1 * t2.f1) AS n1m ;
>			FROM (lcCur) t1 JOIN Test2 t2 ON t2.Mx = t1.M1 OR t2.Mx = t1.M2 ;
>			GROUP BY 1,2 ;
>		) tm ON tm.m1 = t0.m1 AND tm.m2 = t0.m2
>
>
>
>>Okay, this one works fine. Thank you.
>>
>>Now the tricky part
>>
>>test is not directly availabel
>>
>>All i now is a var just like
>>
>>lcCur = 'Test'
>>
>>
>>
>>lcCur = 'Test'
>>UPDATE (lcCur) SET n1 = tm.n1m ;
>>	FROM (lcCur) inner JOIN ( ;
>>		SELECT t1.m1, t1.m2, MAX(t1.n1 * t2.f1) AS n1m ;
>>			FROM (lcCur) t1 inner JOIN Test2 t2 ON t2.Mx = t1.M1 OR t2.Mx = t1.M2 ;
>>			GROUP BY 1,2 ;
>>		) tm ON tm.m1 = &lcCur..m1 AND tm.m2 = &lcCur..m2
>>
>>
>>will not work.
>>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform