Short answer would be yes.
Have you tried / got any errors? If yes, please take a look at : calling stored procedure from solr
You may want to add SET NOCOUNT ON;
at the beginning of the stored procedure.
문제
I was wondering if its possible to call a storedProcedure in the deltaImportQuery. This is what I 'm trying to do.
<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
In my store procedure I am deleting n rows and inserting them back. And then finally run a select statement to get some data back from the delta import query.
Can anyone tell me if this is possible in solr or not?
Thanks
해결책
Short answer would be yes.
Have you tried / got any errors? If yes, please take a look at : calling stored procedure from solr
You may want to add SET NOCOUNT ON;
at the beginning of the stored procedure.