Hi Evans,
thanks for the idea. This brings up a couple more questions:
What if the value has to be a string of numeric characters? Is there a way to generate sequential numbers and convert them to characters?
How can I just return say 10 characters from the newid() function? Or would that then mean the values won't be unique?
>>Hi,
>>
>>I'm fairly new to SQL Server.
>>
>>I have a table with 300,000 odd records and for testing I am trying to use this data to increase the number of records 5 fold so I'll end up with approx 1.5 million records.
>>
>>So I can do this:
>>
>>INSERT INTO
()
>>SELECT
>>FROM
>>
>>My difficulty is that one of the fields is a varchar(50) field that stores a unique number from a form (something like an invoice number), so I need to generate a unique number for each record.
>>
>>Any suggestions how to do this?
>>
>>Thanks,
>You can use the NewId() function of SQL, this is create you a unique uniqueidentifier.
>
>select newId() as InvoiceNumber
>
>Evans Carl