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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -