Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
slave_zero69
Starting Member
4 Posts |
Posted - 2004-12-17 : 01:50:08
|
| hello people,im using this to retrieve a database item:select MAX(substring(debitnote, 6, 4)) + 1from paymdebitnotethe debitnote is in format 2100/0001what i want to retrieve is the 0001 part and then add 1 to itwhich makes it 0002 but i always get a returned result of 2can anyone suggest to me any particular SQL function that i can make use of? your help is much appreciated! |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-12-17 : 04:10:40
|
| you can just add the 0's using replicate--------------------keeping it simple... |
 |
|
|
slave_zero69
Starting Member
4 Posts |
Posted - 2004-12-28 : 02:52:16
|
| thanks dude |
 |
|
|
|
|
|