View Single Post
  #108 (permalink)  
Old 01-22-10, 12:10
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Exclamation "AMNY" level-4. 23 start numbers, only !

01/22/2010 "AMNY" level-4. 23 start numbers, only ! > 7 sec <

Code:
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id), 0) + 1, 1, '020090001' 
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 2, '050060000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 3, '004003008'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id), 0) + 1, 4, '000000087'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 5, '800000000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 6, '647000009'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 7, '700500900'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 8, '000070060'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 9, '060040020' 
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
);
Quote:
Line 1: | 3 | 2 | 6 | 8 | 9 | 5 | 4 | 7 | 1 |
Line 2: | 1 | 5 | 8 | 4 | 6 | 7 | 3 | 9 | 2 |
Line 3: | 9 | 7 | 4 | 2 | 1 | 3 | 6 | 5 | 8 |
Line 4: | 2 | 3 | 9 | 6 | 5 | 4 | 1 | 8 | 7 |
Line 5: | 8 | 1 | 5 | 7 | 3 | 9 | 2 | 4 | 6 |
Line 6: | 6 | 4 | 7 | 1 | 8 | 2 | 5 | 3 | 9 |
Line 7: | 7 | 8 | 3 | 5 | 2 | 6 | 9 | 1 | 4 |
Line 8: | 4 | 9 | 2 | 3 | 7 | 1 | 8 | 6 | 5 |
Line 9: | 5 | 6 | 1 | 9 | 4 | 8 | 7 | 2 | 3 |
Lenny
Reply With Quote