larrydavid
Programmer
Hello,
I have this statement:
The idea here is to assign users to TIN numbers that fall within these ranges:
0,1,2,3 = Test_User_1
4,5 = Test_User_2
6,7,8,9 = Test_User_3
So my question is, am I doing this right? Will the IN (4,5) work for Test_User_2?
I am seeing inconsistent results so I am not sure this is the best approach.
Thanks,
Larry
I have this statement:
Code:
UPDATE tbl_Test
SET COLLECTOR =
CASE WHEN Substring(tbl_Test.TIN, 9, 1) <= 3 THEN 'Test_User_1'
--WHEN Substring(tbl_Test.TIN, 9, 1) IN (4,5) THEN 'Test_User_2'
ELSE 'Test_User_3'
END
FROM tbl_Test
WHERE Test_Owner = 'RCR'
SUBSTRING(tbl_Test.TIN, 9, 1) NOT IN
('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z')
The idea here is to assign users to TIN numbers that fall within these ranges:
0,1,2,3 = Test_User_1
4,5 = Test_User_2
6,7,8,9 = Test_User_3
So my question is, am I doing this right? Will the IN (4,5) work for Test_User_2?
I am seeing inconsistent results so I am not sure this is the best approach.
Thanks,
Larry