yesubabu k

yesubabu k

  • 1.1k
  • 644
  • 62.3k

reset invNo for the next financial year

Mar 16 2018 11:45 PM
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 

Answers (1)