devxlogo

August 16, 2018

Compare Only Alphabetic Values

You can force a like condition to compare only alphabetic values. Here is how: ORDER BY CASE WHEN LTrim(RTrim(Place.Name)) NOT LIKE ‘%[^0-9]%’ THEN 1 ELSE 2 END, Place.Name