View Single Post
  #111 (permalink)  
Old 02-02-10, 13:19
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Thumbs up Not exist the Hard Sudokus to us !

Hard Sudoku solved easy:

Code:
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id), 0) + 1, 1, '700000009' 
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 2, '890060000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 3, '010054020'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id), 0) + 1, 4, '000298600'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 5, '007000000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 6, '002375000'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 7, '050480030'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 8, '000010092'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id), 0) + 1, 9, '600000007'
     , ifnull(max(sd_id), 0) + 1, timestamp(generate_unique())
  from Sd_Source 
);
Quote:
Line 1: | 7 | 2 | 5 | 8 | 3 | 1 | 4 | 6 | 9 |
Line 2: | 8 | 9 | 4 | 7 | 6 | 2 | 3 | 1 | 5 |
Line 3: | 3 | 1 | 6 | 9 | 5 | 4 | 7 | 2 | 8 |
Line 4: | 5 | 4 | 3 | 2 | 9 | 8 | 6 | 7 | 1 |
Line 5: | 9 | 8 | 7 | 1 | 4 | 6 | 2 | 5 | 3 |
Line 6: | 1 | 6 | 2 | 3 | 7 | 5 | 9 | 8 | 4 |
Line 7: | 2 | 5 | 9 | 4 | 8 | 7 | 1 | 3 | 6 |
Line 8: | 4 | 7 | 8 | 6 | 1 | 3 | 5 | 9 | 2 |
Line 9: | 6 | 3 | 1 | 5 | 2 | 9 | 8 | 4 | 7 |
Lenny
Reply With Quote