Question

I just want to find the max value from the Visitor table. Last is working fine but when digit come VI9999 after that it always returns max value same not VI10000. Please Suggest me what I will do for this...

Thanks in Advance..

Sql query:

select MAX(TSID) 
FROM VISITOR_TABLE;
Was it helpful?

Solution

select Max(cast(substring(TSID, 3, 10) as int)) 
FROM VISITOR_TABLE;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top