你考虑过用这个吗?
尝试类似以下:创造者->SQLExecutor具有以下代码:
更新所有者。其中,set field1 = iif(field1 = ", null, field1), set field2 = iif(field2 = ", null, field2), set field3 = iif(field3 = ", null, field3),…注意,这里没有where-子句,并且SQLExecutor只被调用一次。 >文档。提示:在执行这样的查询之前,一定要对表进行备份
field1 = If field1 have a value Then '@ReplaceString(@Value(field1),', ")' Else null(一个字符串值"null",而不是<null>值)< / pre > < p > < img src = " /存储/ temp / 9570 -条件-价值-设置的例子。那么,SQl语句自然应该改成:update owner。表集field1 = @Value(field1),…< / >之前
我不能说,为什么COG是红色的,但我怀疑这是一个错误。确保属性您在SQL中引用正确曝光在工作区中,注意区分大小写。 p>
知道SQLExecutor没有对自己的SQL语法的概念,它会通过在任何你写有您的数据库。所以,如果你的数据库是MS SQL,你基本上可以写任何MS SQL接受的SQLExecutor,FME不会验证什么,但内部功能的引用,如@Value()等。 p>
注意,但是,if fieldA and/or fieldB are string values, you must make sure to insert the single quotes yourself, e.g.
update dbo.owner.mytable set field1 = '@Value(fieldA)' where ...
Other than that you seem to be on the right track.