P124,P125,9871780998,P126,BPPQ,P127,PBNN ;
select top 1 PatCode from Patient_Detail where PatCode like 'P%' order by PatID desc
P127
PBNN
SELECT top 1 PatCode FROM Patient_Detail WHERE PatCode LIKE 'P%' AND ISNUMERIC(SUBSTRING(PatCode, 2,LEN(PatCode)-1))=1 ORDER BY PatID DESC
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)