Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 The Yak Corral
 My brain hurts

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-09-18 : 14:36:21
I've recently started playing chess again after many years and upon discovering [url]http://gameknot.com[/url]. Discovered that I'm much worse at it than I thought I was (which was pretty difficult)

Anyone here fancy forming a team, I'm sure we could come up with a good name, anyone have any suggestions?

steve

Steve no function beer well without

Pat Phelan
Posting Yak Master

187 Posts

Posted - 2004-09-19 : 01:05:14
An old friend of mine owns ChessCo, and is going to be sponsoring a tournament with an astounding number of international players and grandmasters in a month or so... I haven't played conventional 2d chess for some time, even though my cell phone plays a decent (around 1900 in tournament time) game.

One of these days I need to get back into the game, but at least at the moment time doesn't allow for that.

-PatP
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-09-19 : 02:02:54
I'll play provided you play using equipment and infrastructure provided by your IT department!

Kristen
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-19 : 10:52:22
I'll play some though again not in practice at all... I seem to play much better on a real board than on the computer...

Corey
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-19 : 15:59:25
i'm game. haven't played in a while so this should be a nice wotkout for little grey cells

some team names of the top of my head:
- SQLTeam-ers
- Elwoosians - as you're the brain of the idea
- SelectStars

Go with the flow & have fun! Else fight the flow
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-09-19 : 19:06:02
How about the Krusties, don't know about you guys but it fits in with the way I play at the moment, and I like the Simpsons reference

Or perhaps the Great IT Sqlers (GITS for short)

Kristen, what are you saying?? I just hope that it is my lot that backup the chess databases then we might stand a chance of winning just by making it crash

steve

Steve no function beer well without
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2004-09-20 : 00:45:30
I played a lot of chess growing up, even in college. But then I found poker. Poker is really a nice substitute for chess. It scratches that same itch for me atleast.



-ec
Go to Top of Page

kselvia
Aged Yak Warrior

526 Posts

Posted - 2004-09-20 : 03:09:59
I used to play chess quite a bit but it's been a while. I can't be counted on to show up at a particular place at a particular time.

I wonder if anyone would be interested in a reader challenge of solving the n-Queens problem in T-SQL?

--Ken
I want to die in my sleep like my grandfather, not screaming in terror like his passengers.
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2004-09-20 : 04:30:08
This was lurking on my harddisk, from about the same time as the yak finding. No idea if they give the right answer, but they all return 92 rows, so that's an encouraging sign
Edit: It probably does work -- essentially it's the same method as used here: http://www.mozart-oz.org/documentation/fdt/node25.html#section.scripts.queens

It's a bit wide, so I won't use [code].

SET STATISTICS TIME ON
SET STATISTICS IO ON

CREATE TABLE #n (i tinyint PRIMARY KEY)
INSERT INTO #n
SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4
UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8
GO

SELECT q1,q2,q3,q4,q5,q6,q7,q8 FROM (
SELECT q1.i q1, q2.i q2, q3.i q3, q4.i q4,
q5.i q5, q6.i q6, q7.i q7, q8.i q8
FROM #n q1, #n q2, #n q3, #n q4, #n q5, #n q6, #n q7, #n q8) numbers
WHERE q2 NOT IN (q1)
AND q3 NOT IN (q1,q2)
AND q4 NOT IN (q1,q2,q3)
AND q5 NOT IN (q1,q2,q3,q4)
AND q6 NOT IN (q1,q2,q3,q4,q5)
AND q7 NOT IN (q1,q2,q3,q4,q5,q6)
AND q8 NOT IN (q1,q2,q3,q4,q5,q6,q7)
AND q2+2 NOT IN (q1+1)
AND q3+3 NOT IN (q1+1,q2+2)
AND q4+4 NOT IN (q1+1,q2+2,q3+3)
AND q5+5 NOT IN (q1+1,q2+2,q3+3,q4+4)
AND q6+6 NOT IN (q1+1,q2+2,q3+3,q4+4,q5+5)
AND q7+7 NOT IN (q1+1,q2+2,q3+3,q4+4,q5+5,q6+6)
AND q8+8 NOT IN (q1+1,q2+2,q3+3,q4+4,q5+5,q6+6,q7+7)
AND q2-2 NOT IN (q1-1)
AND q3-3 NOT IN (q1-1,q2-2)
AND q4-4 NOT IN (q1-1,q2-2,q3-3)
AND q5-5 NOT IN (q1-1,q2-2,q3-3,q4-4)
AND q6-6 NOT IN (q1-1,q2-2,q3-3,q4-4,q5-5)
AND q7-7 NOT IN (q1-1,q2-2,q3-3,q4-4,q5-5,q6-6)
AND q8-8 NOT IN (q1-1,q2-2,q3-3,q4-4,q5-5,q6-6,q7-7)

SELECT q1,q2,q3,q4,q5,q6,q7,q8 FROM (
SELECT q1.i q1, q2.i q2, q3.i q3, q4.i q4,
q5.i q5, q6.i q6, q7.i q7, q8.i q8
FROM #n q1, #n q2, #n q3, #n q4, #n q5, #n q6, #n q7, #n q8) numbers
WHERE q2 NOT IN (q1)
AND q3 NOT IN (q1,q2)
AND q4 NOT IN (q1,q2,q3)
AND q5 NOT IN (q1,q2,q3,q4)
AND q6 NOT IN (q1,q2,q3,q4,q5)
AND q7 NOT IN (q1,q2,q3,q4,q5,q6)
AND q8 NOT IN (q1,q2,q3,q4,q5,q6,q7)
AND q2 NOT IN (q1-1)
AND q3 NOT IN (q1-2,q2-1)
AND q4 NOT IN (q1-3,q2-2,q3-1)
AND q5 NOT IN (q1-4,q2-3,q3-2,q4-1)
AND q6 NOT IN (q1-5,q2-4,q3-3,q4-2,q5-1)
AND q7 NOT IN (q1-6,q2-5,q3-4,q4-3,q5-2,q6-1)
AND q8 NOT IN (q1-7,q2-6,q3-5,q4-4,q5-3,q6-2,q7-1)
AND q2 NOT IN (q1+1)
AND q3 NOT IN (q1+2,q2+1)
AND q4 NOT IN (q1+3,q2+2,q3+1)
AND q5 NOT IN (q1+4,q2+3,q3+2,q4+1)
AND q6 NOT IN (q1+5,q2+4,q3+3,q4+2,q5+1)
AND q7 NOT IN (q1+6,q2+5,q3+4,q4+3,q5+2,q6+1)
AND q8 NOT IN (q1+7,q2+6,q3+5,q4+4,q5+3,q6+2,q7+1)

SELECT q1,q2,q3,q4,q5,q6,q7,q8 FROM (
SELECT q1.i q1, q2.i q2, q3.i q3, q4.i q4, q5.i q5, q6.i q6, q7.i q7, q8.i q8
FROM #n q1, #n q2, #n q3, #n q4, #n q5, #n q6, #n q7, #n q8) numbers
WHERE q2 NOT IN (q1-1,q1,q1+1)
AND q3 NOT IN (q1-2,q1,q1+2, q2-1,q2,q2+1)
AND q4 NOT IN (q1-3,q1,q1+3, q2-2,q2,q2+2, q3-1,q3,q3+1)
AND q5 NOT IN (q1-4,q1,q1+4, q2-3,q2,q2+3, q3-2,q3,q3+2, q4-1,q4,q4+1)
AND q6 NOT IN (q1-5,q1,q1+5, q2-4,q2,q2+4, q3-3,q3,q3+3, q4-2,q4,q4+2, q5-1,q5,q5+1)
AND q7 NOT IN (q1-6,q1,q1+6, q2-5,q2,q2+5, q3-4,q3,q3+4, q4-3,q4,q4+3, q5-2,q5,q5+2, q6-1,q6,q6+1)
AND q8 NOT IN (q1-7,q1,q1+7, q2-6,q2,q2+6, q3-5,q3,q3+5, q4-4,q4,q4+4, q5-3,q5,q5+3, q6-2,q6,q6+2, q7-1,q7,q7+1)

SELECT q1,q2,q3,q4,q5,q6,q7,q8 FROM (
SELECT q1.i q1, q2.i q2, q3.i q3, q4.i q4, q5.i q5, q6.i q6, q7.i q7,
36-q1.i-q2.i-q3.i-q4.i-q5.i-q6.i-q7.i q8
FROM #n q1, #n q2, #n q3, #n q4, #n q5, #n q6, #n q7) numbers
WHERE q2 NOT IN (q1-1,q1,q1+1)
AND q3 NOT IN (q1-2,q1,q1+2, q2-1,q2,q2+1)
AND q4 NOT IN (q1-3,q1,q1+3, q2-2,q2,q2+2, q3-1,q3,q3+1)
AND q5 NOT IN (q1-4,q1,q1+4, q2-3,q2,q2+3, q3-2,q3,q3+2, q4-1,q4,q4+1)
AND q6 NOT IN (q1-5,q1,q1+5, q2-4,q2,q2+4, q3-3,q3,q3+3, q4-2,q4,q4+2, q5-1,q5,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 2 6 1 3 8
5 2 4 7 3 8 6 1
5 7 1 3 8 6 4 2
5 3 8 4 7 1 6 2
5 7 4 1 3 8 6 2
5 8 4 1 7 2 6 3
5 7 1 4 2 8 6 3
5 1 4 6 8 2 7 3
5 2 6 1 7 4 8 3
5 1 8 6 3 7 2 4
5 3 1 7 2 8 6 4
5 7 2 6 3 1 8 4
5 7 2 4 8 1 3 6
5 1 8 4 2 7 3 6
5 2 8 1 4 7 3 6
5 2 4 6 8 3 1 7
5 8 4 1 3 6 2 7
5 3 1 6 8 2 4 7
5 7 2 6 3 1 4 8
6 4 2 8 5 7 1 3
6 4 7 1 8 2 5 3
6 8 2 4 1 7 5 3
6 2 7 1 4 8 5 3
6 4 1 5 8 2 7 3
6 3 7 2 8 5 1 4
6 3 1 7 5 8 2 4
6 1 5 2 8 3 7 4
6 2 7 1 3 5 8 4
6 3 7 2 4 8 1 5
6 3 7 4 1 8 2 5
6 3 1 8 4 2 7 5
6 3 5 8 1 4 2 7
6 3 1 8 5 2 4 7
6 3 5 7 1 4 2 8
6 4 7 1 3 5 2 8
7 3 1 6 8 5 2 4
7 5 3 1 6 8 2 4
7 3 8 2 5 1 6 4
7 1 3 8 6 4 2 5
7 4 2 8 6 1 3 5
7 2 6 3 1 4 8 5
7 4 2 5 8 1 3 6
7 2 4 1 8 5 3 6
8 3 1 6 2 5 7 4
8 4 1 3 6 2 7 5
8 2 4 1 7 5 3 6
8 2 5 3 1 7 4 6
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2004-09-20 : 08:44:00
As to the chess. The greatest chess master Alekhin was a funny man. All his male relatives were alcoholics, he himself was an alcoholic. His mother was a cocain addictor. Btw he was born in a very rich family. I think our Brett with his margarittas is just a milk baby when compared to this chess giant.
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-09-20 : 09:19:12
At looking to the title to this thread I had a Monty Python flash-back.

I like the sound of two bricks being smashed together......Mybrain hurts too.



Jim
Users <> Logic
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-09-21 : 17:52:47
Two bricks being smashed together - sounds like a good name for a team to me

cheers Jim

perhaps we could have a few choruses of the lumberjack song while we play

steve

Steve no function beer well without
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-09-22 : 13:28:47
Mind you don't get your thumbs caught ...

Kristen
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-09-24 : 03:45:18
Looks like it would cost money to setup a team and as you may know from elsewhere on these forums, for me bus driving would be more lucrative therefore I vote for someone else to be team boss .

DELETE ALL MONEY FROM ACCOUNT AS WIFE
sic.

If in the mean time anyone fancies a game I use the same name on Gameknot as I do here

Steve no function beer well without
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-24 : 07:27:04
quote:
Originally posted by elwoos
DELETE ALL MONEY FROM ACCOUNT AS WIFE
sic.



that's what happens when you upgrade from
GirlFriend 2.3 to Wife 1.2...

Go with the flow & have fun! Else fight the flow
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2004-09-24 : 10:11:15
quote:
Originally posted by spirit1

quote:
Originally posted by elwoos
DELETE ALL MONEY FROM ACCOUNT AS WIFE
sic.



that's what happens when you upgrade from
GirlFriend 2.3 to Wife 1.2...

Go with the flow & have fun! Else fight the flow


But you also get

DELETE ALL OLDGIRLFRIENDS FROM MEMORY

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-24 : 10:18:20
don't see a reason to do that, really.

ALTER TABLE Life ALTER COLUMN OldGirlFriends CONSTRAINT OnlyTouchWife UNIQUE

no one said anything about forgetting




Go with the flow & have fun! Else fight the flow
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-09-29 : 12:49:12
A not so seriuos name could be:
The Hash Joins

couldn't resist...
DENY ALL TO husband
GRANT INSERT ON wife TO husband
EXEC sp_addsrvrolemember 'husband', 'bulkadmin'
BULK INSERT wife FROM 'C:\husband.log'


/rockmoose
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-29 : 13:14:22
i just spent a few minutes laughing my ass off.... very "good one!!!"

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-29 : 13:53:58
That was great moose!!!

Corey
Go to Top of Page
    Next Page

- Advertisement -