Cannot generate PO Number

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 ?

Reply to
Mahmoud Amin
Loading thread data ...

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.