found very interesting artile here.
Worth a look and some thought.
Tuesday, September 26, 2006
Monday, September 25, 2006
Query hierarchical data - SQL 2005
Question:
Table data...
Line Name ForLine
1 Stuff 0
2 SubStuff 1
3 SubSubStuff 2
4 Other 0
5 SubOther 4
6 LowStuff 3
Result required...
Line Name ForLine TopName
3 SubSubStuff 2 Stuff
Gabbar:
WITH MyTree (Line, Name, ForLine, TopName)
AS
(
-- Anchor member definition
SELECT
Line,
Name,
ForLine,
Name as TopName
FROM
MyTable
WHERE
ForLine = 0
UNION ALL
-- Recursive member definition
SELECT
m.Line,
m.Name,
m.ForLine,
t.TopName
FROM
MyTable m
INNER JOIN MyTree t
ON m.ForLine = t.Line
)
SELECT
Line,
Name,
ForLine,
TopName
FROM
MyTree
WHERE
Line = 3
Table data...
Line Name ForLine
1 Stuff 0
2 SubStuff 1
3 SubSubStuff 2
4 Other 0
5 SubOther 4
6 LowStuff 3
Result required...
Line Name ForLine TopName
3 SubSubStuff 2 Stuff
Gabbar:
WITH MyTree (Line, Name, ForLine, TopName)
AS
(
-- Anchor member definition
SELECT
Line,
Name,
ForLine,
Name as TopName
FROM
MyTable
WHERE
ForLine = 0
UNION ALL
-- Recursive member definition
SELECT
m.Line,
m.Name,
m.ForLine,
t.TopName
FROM
MyTable m
INNER JOIN MyTree t
ON m.ForLine = t.Line
)
SELECT
Line,
Name,
ForLine,
TopName
FROM
MyTree
WHERE
Line = 3
Wednesday, September 20, 2006
बराहाचा शोध
छानच लिहीता येते बराहा वापरुन. हा माझा पहिलाच प्रयोग आहे मराठी लिहिन्याचा. ठ लिहीणे जरा जडच गेले.
Tuesday, September 19, 2006
a win .. at last
I thought, I have forgotten how to win a chess game. But no, rising from the ashes, I won this, and that too with white pieces......
1. e4 e6 2. f4 d5 3. Nf3 d4 4. Bc4 c5 5. d3 a6 6. f5 b5 7. fxe6 bxc4 8. exf7+ Kxf7 9. Ne5+ Ke8 10. Qh5+ 11. Nxg6 12. Qe5+ 13. Nxh8 14. Qe6 15. Qf7#
1. e4 e6 2. f4 d5 3. Nf3 d4 4. Bc4 c5 5. d3 a6 6. f5 b5 7. fxe6 bxc4 8. exf7+ Kxf7 9. Ne5+ Ke8 10. Qh5+ 11. Nxg6 12. Qe5+ 13. Nxh8 14. Qe6 15. Qf7#
Wednesday, August 16, 2006
Wednesday, August 09, 2006
Attack with white
Now, I'm not very good with white pieces. Still I managed to do a very good attack in this game. And I loved making the last two moves.
Among the best quick games that I've played.
click here to play through the game.
[Event "Long competition 2"]
[Site "chesshere.com"]
[Date "2006.05.04"]
[White "Gabbar"]
[Black "Zosimo02"]
[Result "1-0"]
[WhiteElo "1497"]
[BlackElo "1504"]
1. e4 e5 2. Nf3 Nc6 3. Bc4 Be7 4. d3 Nf6 5. Nc3 O-O 6. O-O d6 7. Nd5 Nxd5 8. Bxd5 Be6 9. d4 Bg4 10. Qd3 Bxf3 11. Qxf3 Nxd4 12. Qg4 Re8 13. f4 Nxc2 14. fxe5 Nxa1 15. Rxf7 g6 16. Bh6 dxe5 17. Rf8# 1-0
Among the best quick games that I've played.
click here to play through the game.
[Event "Long competition 2"]
[Site "chesshere.com"]
[Date "2006.05.04"]
[White "Gabbar"]
[Black "Zosimo02"]
[Result "1-0"]
[WhiteElo "1497"]
[BlackElo "1504"]
1. e4 e5 2. Nf3 Nc6 3. Bc4 Be7 4. d3 Nf6 5. Nc3 O-O 6. O-O d6 7. Nd5 Nxd5 8. Bxd5 Be6 9. d4 Bg4 10. Qd3 Bxf3 11. Qxf3 Nxd4 12. Qg4 Re8 13. f4 Nxc2 14. fxe5 Nxa1 15. Rxf7 g6 16. Bh6 dxe5 17. Rf8# 1-0
Subscribe to:
Posts (Atom)