CousinBrucie
Programmer
Hello, I'm taking in the string comparisons I need, but now need to just update a column in another table based on this result. Here's a snippet of what I'm trying to accomplish with a CASE WHEN THEN END but it isn't working:
SELECT * FROM TestSubmission t
CASE WHEN t.Region <> @region THEN
OR t.SUB_TYPE <> @subType
OR t.VENDOR_ID <> @vendorId
OR t.DELIVERY_TYPE <> @deliveryType
OR t.DELIVERY_METHOD <> @deliveryMethod
(
UPDATE SubmissionManagement
SET FileLoadStatus = 4
)
ELSE
(
UPDATE SubmissionManagement
SET FileLoadStatus = 1
)
END
Is there any possibility of working with results from something like this?:
SELECT *
FROM TestSubmission t
WHERE t.Region <> @region OR
t.SUB_TYPE <> @subType OR
t.VENDOR_ID <> @vendorID OR
t.DELIVERY_TYPE <> @deliveryType OR
t.DELIVERY_TYPE <> @deliveryMethod
Grateful for any assistance.
Thank you,
Bruce
SELECT * FROM TestSubmission t
CASE WHEN t.Region <> @region THEN
OR t.SUB_TYPE <> @subType
OR t.VENDOR_ID <> @vendorId
OR t.DELIVERY_TYPE <> @deliveryType
OR t.DELIVERY_METHOD <> @deliveryMethod
(
UPDATE SubmissionManagement
SET FileLoadStatus = 4
)
ELSE
(
UPDATE SubmissionManagement
SET FileLoadStatus = 1
)
END
Is there any possibility of working with results from something like this?:
SELECT *
FROM TestSubmission t
WHERE t.Region <> @region OR
t.SUB_TYPE <> @subType OR
t.VENDOR_ID <> @vendorID OR
t.DELIVERY_TYPE <> @deliveryType OR
t.DELIVERY_TYPE <> @deliveryMethod
Grateful for any assistance.
Thank you,
Bruce