I need to reconcile refunds in a database against an external input. This isn't the smartest way to do it, but it's the way that makes the most sense for this project.
I need to create a stored procedure that accepts a key & value as an input to create a temporary table. Though honestly I can't wrap my mind around it. I can either add variables as parameters & work on a one-by-one scale or I can input unordered lists as a parameter.
Is there a sensible way to import dictionaries as a parameter? If not are there better alternatives?
IF OBJECT_ID('tempdb..#RakRefunds') IS NOT NULL DROP TABLE #RakRefunds CREATE TABLE #RakRefunds (OrderID NVARCHAR(400), RefundValue DECIMAL(18,2)) INSERT INTO #RakRefunds (OrderID,RefundValue) VALUES('77911333','89.99'); INSERT INTO #RakRefunds (OrderID,RefundValue) VALUES('77960358','12.67');