I have a stored procedure that I have created that for right now I am not touching a database.
Pseudo code
CREATE PROCEDURE [dbo].[CustomerKeyChecker]
@ldccode VARCHAR(12)
AS
@result int = 0
BEGIN
DECLARE @listofCodes varchar(200)
SET @listofCodes = 'CLP, UIC, NSTAR, NSTARB, NSTARC, PSNH'
-- So lets say that the passed in @ldccode is "CLP" , well then I went to
-- set a @result = 1
END
What is the a decent way to do a substring to search for these codes inside list?
Pseudo code:
substring(@lcdcode, @listOfCodes) ?
Again, for now this is nothing to do with the database, and I understand that someone would say "why even pass this data to sql" ... there will be sql tables added in later is why ...