teblack
Programmer
- Apr 30, 2004
- 45
Below is what I'm using to generate a random number based on a new input record. It works fine with the expecetion of once in a while it will generate an asterisks for the field, which is wrong. Can anyone tell me why it's doing that.
Code:
DECLARE @max int
DECLARE @sublocation char(3)
SET @max = 999
SET @sublocation = convert(int, rand()* 100000) % @max + 100
select @sublocation
[/copde]
I need the number to be a three digit number betweeen 001 - 999
Thanks in advance for the help with this.
Thanks again,
TBlack -