How to Find Greater Than of an Alphanumeric Number


Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts Meta

Q&A about the site for enthusiasts and power users of the Android operating system

declare @tbl as table(SalesOrderNo varchar(10));
insert into @tbl values
('D 20'),
('D 21');

select SalesOrderNo from @tbl
where SalesOrderNo LIKE 'D%'
and cast(right(SalesOrderNo, len(SalesOrderNo) - 1) as int) > 16;

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results