Domanda

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;
È stato utile?

Soluzione

select Max(cast(substring(TSID, 3, 10) as int)) 
FROM VISITOR_TABLE;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top