![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I just wana make a random id number based on4 digits-for examples?? Thanks in Advance Ch.Yallin see the help files on the rnd() function. |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I just wana make a random id number based on4 digits-for examples?? |
#4
| |||
| |||
|
|
chico_yallin (AT) yahoo (DOT) com (chico_yallin (AT) yahoo (DOT) com) writes: I just wana make a random id number based on4 digits-for examples?? checksum(newid()) is better than the rand() function. Please provide instructions on the use of these functions in MS- |
#5
| |||
| |||
|
|
chico_yallin (AT) yahoo (DOT) com (chico_yallin (AT) yahoo (DOT) com) writes: I just wana make a random id number based on4 digits-for examples?? checksum(newid()) is better than the rand() function. |
#6
| |||
| |||
|
|
On Sat, 9 Jun 2007 19:19:45 +0000 (UTC), Erland Sommarskog wrote: chico_yallin (AT) yahoo (DOT) com (chico_yallin (AT) yahoo (DOT) com) writes: I just wana make a random id number based on4 digits-for examples?? checksum(newid()) is better than the rand() function. Hi Erland, What exactly makes checksum(newid()) better than rand() ? |
#7
| |||
| |||
|
|
Erland Sommarskog <esquel (AT) sommarskog (DOT) se> wrote in news:Xns994AD933293B9Yazorman (AT) 127 (DOT) 0.0.1: chico_yallin (AT) yahoo (DOT) com (chico_yallin (AT) yahoo (DOT) com) writes: I just wana make a random id number based on4 digits-for examples?? checksum(newid()) is better than the rand() function. Please provide instructions on the use of these functions in MS- Access using the Jet engine. |
#8
| |||
| |||
|
|
Bob Quintal (rquintal (AT) sPAmpatico (DOT) ca) writes: Erland Sommarskog <esquel (AT) sommarskog (DOT) se> wrote in news:Xns994AD933293B9Yazorman (AT) 127 (DOT) 0.0.1: chico_yallin (AT) yahoo (DOT) com (chico_yallin (AT) yahoo (DOT) com) writes: I just wana make a random id number based on4 digits-for examples?? checksum(newid()) is better than the rand() function. Please provide instructions on the use of these functions in MS- Access using the Jet engine. Sorry, I did not notice that the thread was cross-posted between the SQL Server and Access newsgroups. I assumed that since you posted in a newsgroup for SQL Server, you wanted a solution for SQL Server. I have no idea what might work in Access. I didn't notice the cross-post either, and I don't know wether |
#9
| |||
| |||
|
|
I just want to make a random id number based on 4 digits |
#10
| |||
| |||
|
|
checksum(newid()) is better than the rand() function. Hi Erland, What exactly makes checksum(newid()) better than rand() ? Here is a practical reason: select rand(), checksum(newid()) from (select n = 1 union all select 2 union all select 4) as x I believe that there also issues with the randomness of rand(), although I don't remember the exact details. Steve Kass knows the full story. |
![]() |
| Thread Tools | |
| Display Modes | |
| |