-- contextIsKey generated review draft
-- No statement in this file has been executed.

-- loyalty.usp_reconcile_loyalty_customer [HIGH]
SELECT customer_id FROM loyalty.member_snapshot WHERE TRY_CONVERT(BIGINT, customer_id) = @customer_id;

-- operations.usp_match_regional_returns [MEDIUM]
-- MANUAL REVIEW: Verify both join operands are BIGINT before changing the source.
-- Original: SELECT r.return_id FROM operations.returns r JOIN commerce.orders o ON r.customer_id = o.customer_id;

-- finance.vw_customer_revenue_bridge [HIGH]
SELECT TRY_CAST(customer_id AS BIGINT) AS customer_id, net_revenue FROM finance.revenue_daily;

-- exports.usp_export_customer_segments [LOW]
-- MANUAL REVIEW: Contains dynamic SQL, so the referenced object and runtime type need manual review.
-- Original: DECLARE @sql nvarchar(max) = N'SELECT customer_id FROM ' + @table; EXEC sys.sp_executesql @sql;
