sql server - Max() function not returns the max value -


i used max() retrive max value column. returns wrong output. here max() returns . kindly suggest

select seq_no appltype app_no = '01' 

output : 1,2,3,4,5,6,7,8,9,10

select max(seq_no) appltype app_no = '01' 

output : 9 can't able attach image new stack overflow.

the field seq_no not numeric type. please try query:

select max(cast(seq_no int))    appltype   app_no = '01' 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -