Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewID() analogue in Access
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00773732
Message ID:
00776242
Views:
26
>Hi!
>
>MS Access does not have function identical to NewID().
>
>If you have AutoNumber in your table, and know min and max values of autonumber field, you can use RND() function for this, but you would require to run query few times for case it returns no record (if you have "gaps" in sequence of autonumber field values).
>
>BTW, if you can use SQL Server from inside of MS Access, you can easy write SP that will query MS Access data in the same manner :-)
>
>HTH.

Hi Vlad,

So glad, that you're back here in UT. I missed you...

Yes, the idea was to generate random record from the database. This was a question in tek-tips forum and solution for SQL Server is to use NewID() function. The speed is several times better, than using randomize approach. Too bad, that there is no analogue in Access.

Thanks again and hopefully we will see you here again...

How can we use SQL Server inside Access? I don't understand your last sentence.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform