hi all,
I have a field named pkLocationCd with size nchar(5). I am using the following sql command to get the max+1 value through this:
select isnull(max(pkLocationCd
)+1,1) from tbLocationMaster
This works fine for upto 10 records, i.e. I am able to insert 10 records easily, but when I try to insert 11th record it shows me an error. After debugging I found out that the value I am getting is 10 with max+1..........where as it should be getting 11.
can you suggest me where I am going wrong?
Regards,
Royal
Enter your message below
Sign in or Join us (it's free).