sqlclr

Call web service from SQL CLR?

99封情书 提交于 2019-11-26 21:38:05
问题 I have a SQL Server 2012 stored procedure that returns a table. I have to modify that SP to add an additional value to the returned table. Unfortunately, that added value comes from a call to a web-service. From my research, I gather the main ways to do this are using the OLE Automation procedures (sp_OA...) in SQL, or a SQLCLR stored procedure. Given the security context in which the sp_OA... procedures run, the single return value is a VARCHAR(10) registration key, and calls to the service

How is a CLR table valued function 'streaming''?

ⅰ亾dé卋堺 提交于 2019-11-26 21:35:46
问题 The MSDN Docs on table-valued Sql Clr functions states: Transact-SQL table-valued functions materialize the results of calling the function into an intermediate table. ... In contrast, CLR table-valued functions represent a streaming alternative. There is no requirement that the entire set of results be materialized in a single table. The IEnumerable object returned by the managed function is directly called by the execution plan of the query that calls the table-valued function, and the

How to invoke webservice from SQL Server stored procedure

大兔子大兔子 提交于 2019-11-26 21:30:30
问题 I would like to know how to use a web service from a SQL Server stored procedure. I have a table in which the columns specify the city and state of the user. I want to pass this address as a parameter to Google Geocoding API web service and get the latitude and longitude. I have successfully made use of this geocoding api in c#. But now, I want to use it in a stored procedure. Can any one please suggest how to get this done? Or please provide me any links? Any help will be appreciated!!

Sending HTTP POST request from SQL Server 2012 or SQL CLR C#

浪尽此生 提交于 2019-11-26 21:24:14
问题 Is there a generally accepted standard way for sending HTTP requests from SQL Server 2012? What I am trying to do is to use a remote server to process a search query and then insert the results back into the SQL Server 2012 database. The remote server offers a web api that accepts POST requests, with JSON content. I have a working solution, which however requires to load several assemblies into SQL Server. Some of these assemblies are not fully supported (e.g. System.Net.Http.dll), giving a

Is it possible to use user defined aggregates (clr) with window functions (over)?

五迷三道 提交于 2019-11-26 18:34:22
问题 Is it possible to use user defined aggregates (clr) with window functions (over) ? Can't find the answer in the documentation: http://technet.microsoft.com/en-us/library/ms190678.aspx 回答1: You're right that it's tricky to find anything in the documentation. But searching the Connect website, I managed to find this gem: Today, you can use CLR aggregates with OVER clause and PARTITION BY just like regular aggregate functions. Once we have support for window functions... Which was a response