hey frnds...
i have a digit like this....
1300000001
after 1300000009
it should be 1300000010
after 1300000099
it should be 1300000100
1300000101
etc
please give me solution if you have
thanks.....
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Dec 11, 2013, 5:26 AM
The output is:
Jignesh TrivediPosted Dec 11, 2013, 2:38 AM
hi,
Try in SQL
Declare @id int = 10
select right(year(getdate()),2) + RIGHT('0000000000' + CAST(@id AS VARCHAR(7)), 7)
Also refer my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/auto-incremented-column-with-varchar-and-nvarchar-data-type/
hope this will help you.
Mukesh Kumar TiwariPosted Dec 11, 2013, 2:30 AM
in 2013 it will be start from 13
in 2014 it will be start from 14
and it will be of 10 digit...
this type of req i have..
you can give soluaition in both c# or sql....
thanks
Jignesh TrivediPosted Dec 11, 2013, 2:24 AM
are you looking solution in which platform SQL or C#?