Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating test data
Message
From
01/11/2006 15:37:45
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01166318
Message ID:
01166350
Views:
12
Thanks Borislav,

The table has 40 odd fields. Is that too many?

>How many fields you have in that table? If you have a relatively small number of fields you could use something like that:
>
>DECLARE @Test TABLE ( stucture as your original table except the field you want to be unique, UniqueField Ine IDENTITY(1,1))
>DECLARE @i int
>SET @i = 0
>WHILE @i < 10 && or whatever number you need to get 1.5 mil. records
>      BEGIN
>          INSERT INTO @Test (field list here EXCEPT UniqueField)
>          SELECT (field list here EXCEPT UniqueField)
>                FROM MyTable
>          SET @i = @i + 1
>      END
>INSET INTO MyTable
>SELECT (field list here EXCEPT UniqueField), CAST(UniqueField as varchar(50)) FROM @Test
>
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform