斯潘8
斯潘4
Although FME can easily send SQL queries to MS SQL Server,you may already have a query or more complex function defined in SQL Server as aStored Procedure.FME可以使用sqlExecutor或sqlCreator转换器执行存储过程,并提供属性或参数值作为过程的参数。
alter procedure[dbo]。[myproc]--在此处添加存储过程的参数@addressid int,@ COUNTY int
从dbo.address_points中选择*,其中addressid=@addressid和county=@county
Take note of the order of the arguments so you can supply them with FME in the correct order.FME基金将提供一个地址地址和A县.
注意:我们只显示了上面存储过程的一部分—附加了完整的过程(myproc.sql)。
exec dbo.myproc'@value(addressid)',@value(county)'
存储过程的参数按顺序提供,并用逗号分隔。这个@值()syntax tells FME to send the value of that attribute as the parameter to query.
5。查询返回的记录将从Result端口和发送到示例中的数据检查器(可视化工具)。不要忘记单击“选择没有几何图形”按钮来查看这些没有几何图形的功能。
Note: The attributes of the output features will not be exposed - meaning they will be on the features but not accessible in workbench.你可以用AttributeExposertransformer to explicitly name the attributes you want to see or expose them in the SQLExecutor transformer.
exec dbo.MyProc '$(ADDRESSID)','$(COUNTY)'
Again,the parameters for the stored procedure are provided in order and separated by a comma.这个$()syntax tells FME to send the value of the published parameter to the procedure.
Tested in FME Workbench 2018.0
exec[dbo]。[getapiModulesFromToken]@token=n'$(token)'它奏效了,也许这篇文章需要修改,或者我误解了目标?
exec dbo.myproc'$(addressid)',$(county)'和
exec dbo.myproc$(地址ID),“$(县)”。both worked.
?2019安全亚搏在线软件公司|合法的