I want to be able to auto increment a column when a new row is added. Now i can do it numerically i.e. 1,2,3,4 but is there anyway to put in a text before the number i.e. inv01, inv02, inv03, inv04
select 'inv' + right('00'+convert(varchar(2),id),2) from tbl
You could also create a computed column to do this.
What happens when you go past 100?
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.