Hi All,
I am facing a problem with automatic generate PO Number, the application is working on this senario: SELECT ISNULL(MAX(CAST(RIGHT(PONumber, 7) AS INT)), 0) + 1 AS NextPONumber FROM PurchaseOrder WHERE ISNUMERIC(PONumber) 0
my max is '9999999', so it is generate a new one with PONumber = '10000000' then every time it is cannot generate a next one cause of '0000000'
can anyone help me on this ?