dear experts,
Last record---> 918190008091
now i need ---> 918190000001
my SQL query is
select '91718'+right('000000'+cast(isnull(max(cast(right(si_vInvoiceNo,7) as int)),0)+1 as varchar(33)),7) as vInvoiceNo from Sales_Invoice
how can i reset for next financial year 918190000001