Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Update SQL - use value derived from a related select result
Using VFP8 and attempting to run an Update _ SQL type command to set the value of a field in 1 table based upon whatever data is found in the corresponding equivalent field in another table with that update-source data being derived via an SQL Select query where a common key field exists to link the related rows between the source table and the target.
Syntax attempted so far in VFP8 against these VFP8 tables (based upon syntax that works against identical MS SQL Server tables when this update is run from within Query Analyzer against SQL Server tables) is of the form:
UPDATE moneyfields SET ttladjusts = ;
(SELECT query.adjusts FROM query JOIN moneyfields ON VAL(query.control) = VAL(moneyfields.control))
Perhaps needless to say - this does not run. An error is generated of the form "Function name is missing )".
Any suggestions please? /psb
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement