SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Sudoko


SQL Sudoko

Author
Message
David.Poole
David.Poole
SSCertifiable
SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)

Group: General Forum Members
Points: 7867 Visits: 3290
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/dpoole/sqlsudoko.asp

LinkedIn Profile

Newbie on www.simple-talk.com
Andrew Clarke-161005
Andrew Clarke-161005
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: Administrators
Points: 55 Visits: 52
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
rockmoose
rockmoose
Old Hand
Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)Old Hand (351 reputation)

Group: General Forum Members
Points: 351 Visits: 183
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
John Scarborough
John Scarborough
Old Hand
Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)Old Hand (354 reputation)

Group: General Forum Members
Points: 354 Visits: 52
I'm not a fan of Sudoko, but I really enjoyed this article. Good work!

John Scarborough
MCDBA, MCSA
Richard Gardner-291039
Richard Gardner-291039
SSC-Addicted
SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)

Group: General Forum Members
Points: 431 Visits: 421

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...


John Kochanek
John Kochanek
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 19
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
Freddie Davis
Freddie Davis
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 1
I think I am missing something. I have done all the code but it is not working right for me.
Jens Gyldenkærne Clausen
Jens Gyldenkærne Clausen
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
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
Jeff Gray
Jeff Gray
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1315 Visits: 389

Nice job. Now I don't feel so silly for writing a FORTH interpreter in T-SQL.

jg


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search