In the program I'm working with, I need to build a stored procedure just to create a field in the cms editor drop down.
It is very basic, or so I thought. I just want to test the field for a value and if it is there, print a line of text. That's it. It is crazy that I have to write a procedure for this. This cms I am using is ridiculous.
This is the code. Does anyone know what is wrong with it? @OrderID int, @CultureID int
AS SELECT CASE C.ClearingConfigId WHEN 10006 THEN 'Make Check Payable to:' ELSE SCC_Culture.Name END
FROM Orders O INNER JOIN ClearingConfig C ON O.PaymentMethodId = C.ClearingConfigId INNER JOIN StoreClearingConfig SCC ON SCC.ClearingConfigId = C.ClearingConfigId AND O.StoreID = SCC.StoreId LEFT OUTER JOIN StoreClearingConfig_Culture SCC_Culture ON SCC_Culture.StoreClearingConfigID = SCC.StoreClearingConfigId
WHERE O.OrderID = @OrderID AND SCC_Culture.CultureID = @CultureID