|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 9:35 AM
Points: 2,749,
Visits: 1,407
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, January 10, 2012 9:48 AM
Points: 27,
Visits: 18
|
|
This is not the first TSQL Sudoku puzzle solver/generator (see, for example The Sudoku Puzzle Generator. However, it is nicely explained. The two approaches are completely different. Perhaps, with Phil's puzzle generator and this solver, a SQL Server system could keep itself amused for ever!
Editor: Simple-Talk
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 6:26 AM
Points: 271,
Visits: 97
|
|
Other sql soduko's: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50372
Nice job David P. 
rockmoose
You must unlearn what You have learnt
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, July 30, 2012 1:23 PM
Points: 290,
Visits: 44
|
|
I'm not a fan of Sudoko, but I really enjoyed this article. Good work!
John Scarborough MCDBA, MCSA
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, March 21, 2013 9:06 AM
Points: 238,
Visits: 409
|
|
I like Sudokus, the hard one's particularly. Couple of observations : 1) Very nice and all, but perhaps you have a little too much time on your hands? 2) Slippery little algorithms for Sudokus aren't they? I'd never made the relationship between them and SQL server, I'm thinking they're good brain food for coding.... All in all, impressive, but pointless  Keep up the good work...
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 5:09 AM
Points: 2,
Visits: 12
|
|
| I think this is great and plan on spending the next two weeks testing ! Who cares if all the other applications I support go down ... I'll be busy testing
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 23, 2007 11:05 AM
Points: 2,
Visits: 1
|
|
| I think I am missing something. I have done all the code but it is not working right for me.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, January 15, 2013 11:11 AM
Points: 1,945,
Visits: 2,782
|
|
I have column coming up on www.dbazine.com on the same topic!! I used this as a programming exercise in a class I taught in Brazil. But my approach was to fill the (i, j, val) table/array at the start, then to delete the values that were disallowed. The result was much less code.
Books in Celko Series for Morgan-Kaufmann Publishing Analytics and OLAP in SQL Data and Databases: Concepts in Practice Data, Measurements and Standards in SQL SQL for Smarties SQL Programming Style SQL Puzzles and Answers Thinking in Sets Trees and Hierarchies in SQL
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, August 24, 2007 3:44 PM
Points: 2,
Visits: 1
|
|
Two things are missing as far as I can see. There is no CREATE-statement for the Sudoko table. But since the schema for the table is shown, it is trivial to put this in:
IF EXISTS (SELECT * FROM sys.tables WHERE Name='Sudoko') DROP TABLE Sudoko
CREATE TABLE Sudoko ( RowId TinyINT NOT NULL, ColumnID TinyINT NOT NULL, CellValue TinyINT NULL, CONSTRAINT pk_sudoko PRIMARY KEY (RowID, ColumnID) )
A more serious problem occurs at the end of the final implementation of SolveSingleCells - where the sp calls the procedure RemoveSolvedCells. This procedure is not defined anywhere in the article.
Regards Jens Gyldenkærne Clausen
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Today @ 10:30 AM
Points: 963,
Visits: 347
|
|
Nice job. Now I don't feel so silly for writing a FORTH interpreter in T-SQL.  jg
|
|
|
|