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


SQL Sudoko


SQL Sudoko

Author
Message
Dave Poole
Dave Poole
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

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

LinkedIn Profile
www.simple-talk.com
Andrew Clarke-161005
Andrew Clarke-161005
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: Administrators
Points: 161 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
SSC Eights!
SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)

Group: General Forum Members
Points: 943 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
SSC-Addicted
SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)

Group: General Forum Members
Points: 456 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 Eights!
SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)

Group: General Forum Members
Points: 885 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 (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 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
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 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 (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 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
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2829 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