teblack
Programmer
- Apr 30, 2004
- 45
I have the need to build a random number, and I have found code to do that via the faq page. But I need to add some limits to that returned random number. First the random number needs to be greater than 100, but less than 999. I can get the less than 999 but have been unable to figure out the must be greater than 100. Here is the sql statement that I'm using. Any suggestions would be greately appreciated.
Declare @max int
Set @max = 999
Select convert(int, rand()* 100000) % @max
Thanks again for any help -
TBlack -
Declare @max int
Set @max = 999
Select convert(int, rand()* 100000) % @max
Thanks again for any help -
TBlack -