|
Oh, I'll eat nearly anything plated as well as on MasterChef, except tripe or tongue no matter how beautiful it looks.
|
|
|
|
|
Both tripe and tongue are regional dishes in Italy - they are the poors' rich recipes. Cow tongue doesn't impress me much, while tripe depends entirely on how it's cooked, it can be really satisfying.
* CALL APOGEE, SAY AARDWOLF
* GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
* Never pay more than 20 bucks for a computer game.
* I'm a puny punmaker.
|
|
|
|
|
|
Aah, but are you using an adjacency list or nested sets?
|
|
|
|
|
Not a full Welsh breakfast?
TRAITOR!
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Have you ever tried bara lawr?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
..are you okay OG? That read like you might have had a stroke while typing.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Welsh does that, quite a bit...
bara lawr[^]
There is a village not far away called "Cwmrhydyceirw" which tends to look like a stroke victim wrote it to the English! (It's pronounced "Coom reed a ki roo" if you're interested)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: which tends to look like a stroke victim
And that explains why it is a hospital center... (according Wikipedia at least)
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
That spelling makes a lot of sense once you see how it's pronounced
|
|
|
|
|
|
So does Arsenic!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Yes, but I've eaten seaweed before and enjoyed it.
|
|
|
|
|
Finding all child / parent rows is easy. It's when you need to find all descendant / ancestor rows that you might need to turn to hierarchyid[^] for help.
Tutorial: Using the hierarchyid Data Type[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's all ancestors and descendants I needed - and I managed it quite well: Never really got my head round recursive CTE's though!
ALTER PROCEDURE [dbo].[spGetChildPages]
@PageID UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Empty UNIQUEIDENTIFIER;
SET @Empty = dbo.fGetEmptyGuid();
WITH Children AS(
SELECT * FROM Pages WHERE ID = @PageID AND ID != @Empty
UNION ALL
SELECT p.* FROM Pages p
INNER JOIN Children c ON p.ParentID = c.ID
)
SELECT * FROM Children WHERE ID != @PageID;
END
ALTER PROCEDURE [dbo].[spGetParentPages]
@PageID UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Empty UNIQUEIDENTIFIER;
SET @Empty = dbo.fGetEmptyGuid();
WITH Parents AS (
SELECT *, 1 AS Level FROM Pages WHERE ID = @PageID AND ParentID != @Empty
UNION ALL
SELECT p.*, Level+1 AS Level FROM Pages p
INNER JOIN Parents pp ON p.Id = pp.ParentId AND pp.ID != @Empty
)
SELECT ID, PageName, ParentID, SetID
FROM Parents
WHERE ID != @Empty AND ID != @PageID
ORDER BY level DESC
END I needed them for a hierarchical set of pages with a delete and restore feature.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Looks like you managed quite fine. Wait until you need to find the common ancestors of several nodes (I've already done it[^])
One thing I'm interested in, why are you using an EmptyGuid instead of just using NULL?
Oh, and BTW, I'm with Jeff Moden on HierarchyID, I don't use them.
|
|
|
|
|
It makes another part of the software easier, but I don't like it.
I'm mulling it over and may change it back to null - not a problem yet, I'm doing the DL design first this time.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Jörgen Andersson wrote: I don't use them While I dislike the HID I love the concept and use it extensively. However I mine is a NodeKey and is a varchar field.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I don't have a problem with the concept, I have also used it myself, I just find the implementation a bit lacking.
I prefer a combo of nested sets and adjacency lists instead of path enumeration.
|
|
|
|
|
OriginalGriff wrote: a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows
That's got to be at least a zillion calories eh?
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Quite a few brain cells committed suicide, anyway.
SQL syntax isn't the most obvious...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Friends don't let friends do SQL!
SQL leads to CRS
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Sometimes, you gotta do it in the server.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|