Viewing 3 posts - 1 through 3 (of 3 total)
Can you provide more info on input & desired output?
August 19, 2013 at 3:16 am
#1642586
RegEx would be nice in T-SQL ... but here's an an example implementing what HanShi recommended:
CREATE FUNCTION AlphaNum (@s varchar(100))
RETURNS varchar(100) AS
BEGIN
Declare @n int = PatIndex('%[^A-Z0-9]%', @s-2);
While @n...
August 18, 2013 at 4:16 am
#1642480
Another option:
SELECTname, CASE
WHEN Mark1>Mark2 AND Mark1>Mark3 THEN 'Mark1'
WHEN Mark2>Mark3 THEN 'Mark2'
ELSE 'Mark3' END
FROMSample;
August 17, 2013 at 10:43 am
#1642421