7e92e35991
Re-target all search reads, writes, and stored proc calls to dbo.Search2 / SubmitSearch2 / StartSearch2 / CompleteSearch2 / ResetPartialSearches2 so the POC can run side-by-side with prod against the same QA database without contending on the Search table or its procs. Standalone deployment SQL for the new table and procs lives in OLD/sql/ and must be run against the target DB before the POC apps are started. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
547 B
Transact-SQL
22 lines
547 B
Transact-SQL
CREATE PROCEDURE [dbo].[CompleteSearch2] (
|
|
@p_SearchID INT,
|
|
@p_WasSuccessful BIT,
|
|
@p_Results VARBINARY(MAX)
|
|
)
|
|
AS
|
|
DECLARE @v_Status INT;
|
|
|
|
BEGIN
|
|
--Determine status code
|
|
SET @v_Status = CASE @p_WasSuccessful
|
|
WHEN 1 THEN 3
|
|
ELSE 4
|
|
END;
|
|
|
|
--Update search status and results
|
|
UPDATE dbo.Search2
|
|
SET Status = @v_Status,
|
|
Results = @p_Results,
|
|
EndDT = GETDATE()
|
|
WHERE ID = @p_SearchID;
|
|
END |