View Single Post
  #119 (permalink)  
Old 03-12-10, 11:10
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Smile Friday Level-4 Sudoku

Friday Level-4 Sudoku ( 0 sec ):

Code:
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id), 0) + 1, 1, '000708000' 
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 2, '600000103'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 3, '040050020'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id), 0) + 1, 4, '005021070'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 5, '700000009'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 6, '000480500'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 7, '030000090'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 8, '209060007'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 9, '000802000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
);
Quote:
Line 1: | 5 | 2 | 3 | 7 | 1 | 8 | 9 | 4 | 6 |
Line 2: | 6 | 8 | 7 | 2 | 4 | 9 | 1 | 5 | 3 |
Line 3: | 9 | 4 | 1 | 6 | 5 | 3 | 7 | 2 | 8 |
Line 4: | 8 | 6 | 5 | 9 | 2 | 1 | 3 | 7 | 4 |
Line 5: | 7 | 1 | 4 | 5 | 3 | 6 | 2 | 8 | 9 |
Line 6: | 3 | 9 | 2 | 4 | 8 | 7 | 5 | 6 | 1 |
Line 7: | 4 | 3 | 8 | 1 | 7 | 5 | 6 | 9 | 2 |
Line 8: | 2 | 5 | 9 | 3 | 6 | 4 | 8 | 1 | 7 |
Line 9: | 1 | 7 | 6 | 8 | 9 | 2 | 4 | 3 | 5 |
Lenny (page 7)
Reply With Quote