Sql server 2008 Solr dataimporthandler在deltaImportQuery中使用StoredProcess
我想知道是否可以在deltaImportQuery中调用StoredProcess。 这就是我想做的Sql server 2008 Solr dataimporthandler在deltaImportQuery中使用StoredProcess,sql-server-2008,solr,dataimporthandler,Sql Server 2008,Solr,Dataimporthandler,我想知道是否可以在deltaImportQuery中调用StoredProcess。 这就是我想做的 <entity name="entity1" transformer="RegexTransformer" pk="id" query="SELECT * FROM table1 INNER JOIN tabl2 ON table2.tbl1Id = table1.id" deltaImportQuery="exec
<entity name="entity1" transformer="RegexTransformer" pk="id"
query="SELECT * FROM table1
INNER JOIN tabl2 ON table2.tbl1Id = table1.id"
deltaImportQuery="exec populatetable2 ${dih.delta.id}"
deltaQuery="select id from table1 where dtmodified > '${dih.last_index_time}'"
</entity>
ALTER PROCEDURE (@col1 int)
AS
BEGIN
DELETE FROM table2 WHERE tbl1Id = col1
INSERT INTO table2 (col1,col2) Values(1,2)
SELECT * FROM table2
END
在我的存储过程中,我删除了n行并将它们插回。然后最后运行select语句从增量导入查询中获取一些数据
有人能告诉我这在solr中是否可行吗
谢谢简短的回答是肯定的 你试过了吗?如果是,请查看: 您可能需要添加SET NOCOUNT ON;在存储过程的开头