Files
Joseph Doherty 7e92e35991 Point search pipeline at Search2 table and *2 procs for v5 POC
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>
2026-05-04 09:24:45 -04:00

28 lines
646 B
Transact-SQL

CREATE PROCEDURE [dbo].[SubmitSearch2] (
@p_UserName VARCHAR(128),
@p_Name VARCHAR(128),
@p_Criteria VARCHAR(MAX),
@o_SearchID INT OUTPUT
)
AS
BEGIN
--Insert new search record
INSERT INTO Search2
(
UserName,
Name,
Status,
SubmitDT,
Criteria
)
VALUES (
@p_UserName,
@p_Name,
1,
GETDATE(),
@p_Criteria
);
--Get assigned auto-ID
SET @o_SearchID = SCOPE_IDENTITY();
END