果然是高手!我想问vfp是不是支持这样的update语法! update tablename set field=a.field from tablenam1 as a where a.pk=pk
VFP 的 UPDATE - SQL 语句不支持表的联结, 其语法结构如下:UPDATE [DatabaseName1!]TableName1 SET Column_Name1 = eExpression1 [, Column_Name2 = eExpression2 ...] WHERE FilterCondition1 [AND | OR FilterCondition2 ...]]UPDATE - SQL can only update records in a single table. Note that subqueries are supported in UPDATE – SQL. VFP 中的 SQL 语句不支持表的联结很讨厌, 最影响效率的是多记录插入! UPDATE 倒还可以变通, 不是很麻烦.
谢谢了!!我想知道通过linkedserver能不能对vfp进行那样的update啊?
通过linkedserver访问vfp也是要通过OBDC吗? UPDATE - SQL Command Updates records in a table with new values.The Visual FoxPro ODBC Driver supports the native Visual FoxPro language syntax for this command. For driver-specific information, see Driver Res.SyntaxUPDATE [DatabaseName1!]TableName1 SET Column_Name1 = eExpression1 [, Column_Name2 = eExpression2 ...] WHERE FilterCondition1 [AND | OR FilterCondition2 ...]看起来The Visual FoxPro ODBC Driver也不支持update中使用from子句.
update tablename set field=a.field from tablenam1 as a where a.pk=pk
SET Column_Name1 = eExpression1
[, Column_Name2 = eExpression2 ...]
WHERE FilterCondition1 [AND | OR FilterCondition2 ...]]UPDATE - SQL can only update records in a single table. Note that subqueries are supported in UPDATE – SQL.
VFP 中的 SQL 语句不支持表的联结很讨厌, 最影响效率的是多记录插入! UPDATE 倒还可以变通, 不是很麻烦.
Updates records in a table with new values.The Visual FoxPro ODBC Driver supports the native Visual FoxPro language syntax for this command. For driver-specific information, see Driver Res.SyntaxUPDATE [DatabaseName1!]TableName1
SET Column_Name1 = eExpression1
[, Column_Name2 = eExpression2 ...]
WHERE FilterCondition1 [AND | OR FilterCondition2 ...]看起来The Visual FoxPro ODBC Driver也不支持update中使用from子句.