CSdjohnson
Programmer
i have a table with a string column called custnum. the customer number can be alphanumeric. if i have customer numbers 1,2,3,4,5,6,7,8,9,10 and i run the following query:
select max(custnum) as newnum
from dbo_customers
where type_cd = "C"
and isnumeric(custnum);
then i get a data record with custnum = 9 rather then 10.
how can i get the correct custnum of 10 to be returned without having to change the column to type integer?
select max(custnum) as newnum
from dbo_customers
where type_cd = "C"
and isnumeric(custnum);
then i get a data record with custnum = 9 rather then 10.
how can i get the correct custnum of 10 to be returned without having to change the column to type integer?