Solved

data integration - generating unique id numbers

Posted on 2013-05-20
1
253 Views
Last Modified: 2013-05-20
select replace(NEWID(),'-','')
I am using the below script to generate new id numbers ie
3E06BE1EA11C474D8B5B04EB10E4836E

how do you generate like a 100 or so all at once?
Regards
0
Comment
Question by:Amanda Walshaw
1 Comment
 
LVL 12

Accepted Solution

by:
jmcmunn earned 500 total points
Comment Utility
DECLARE @i int = 0
WHILE @i < 100 BEGIN
    SET @i = @i + 1
    select replace(NEWID(),'-','')
END

(sorry, edited to 100 as the bound per the question)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now