>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,
Frank,
create a temp table with an char(1) field. Insert 5 records (ie: A,B,C,D,E). Then select from both tables with a full join into a new table. I guess it'd be a fast way to generate 1.5 million records. ie:create table #tmp (f1 char(1))
insert into #tmp select 'A'
insert into #tmp select 'B'
insert into #tmp select 'C'
insert into #tmp select 'D'
insert into #tmp select 'E'
// you can get and edit this if you right click your table and script as select
// instead of typing all fields
select myTable.field1, myTable.field2, t2.f1+myTable.uniqueField as uniqueField
from myTable, #tmp t2
Cetin