Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Yay! The real thing!

Yay! The real thing!

Scheduled Pinned Locked Moved The Lounge
sharepointdatabase
28 Posts 13 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO Offline
    OriginalGriffO Offline
    OriginalGriff
    wrote on last edited by
    #1

    Herself is cooking a Full English Breakfast for Brunch! It's gotta be over a year since I last had one (she's on a diet, which means I am too) and I've missed 'em! Stuff the Granola - I'm having the real thing today. (And after a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows I damn well deserve it!)

    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

    Kornfeld Eliyahu PeterK D Richard DeemingR Mike HankeyM 4 Replies Last reply
    0
    • OriginalGriffO OriginalGriff

      Herself is cooking a Full English Breakfast for Brunch! It's gotta be over a year since I last had one (she's on a diet, which means I am too) and I've missed 'em! Stuff the Granola - I'm having the real thing today. (And after a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows I damn well deserve it!)

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      Reading the ingredients of a full English breakfast can one make hungry, but the images on the web are awful X| ... You may post one to correct the bug...

      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      OriginalGriffO B 2 Replies Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        Reading the ingredients of a full English breakfast can one make hungry, but the images on the web are awful X| ... You may post one to correct the bug...

        Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        It's never a pretty looking meal - it'd be thrown out of MasterChef on day one - but it's all about the flavours :cool:

        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        D X 2 Replies Last reply
        0
        • OriginalGriffO OriginalGriff

          Herself is cooking a Full English Breakfast for Brunch! It's gotta be over a year since I last had one (she's on a diet, which means I am too) and I've missed 'em! Stuff the Granola - I'm having the real thing today. (And after a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows I damn well deserve it!)

          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

          D Offline
          D Offline
          Daniel Pfeffer
          wrote on last edited by
          #4

          Not a [full Welsh breakfast](http://www.walesonline.co.uk/news/wales-news/what-full-welsh-breakfast-2374227)? :omg: 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

          OriginalGriffO 1 Reply Last reply
          0
          • D Daniel Pfeffer

            Not a [full Welsh breakfast](http://www.walesonline.co.uk/news/wales-news/what-full-welsh-breakfast-2374227)? :omg: 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

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            Have you ever tried bara lawr? X|

            Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            N B 2 Replies Last reply
            0
            • OriginalGriffO OriginalGriff

              Have you ever tried bara lawr? X|

              Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

              N Offline
              N Offline
              Nathan Minier
              wrote on last edited by
              #6

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

              OriginalGriffO 1 Reply Last reply
              0
              • N Nathan Minier

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

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #7

                Welsh does that, quite a bit... :laugh: 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...

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                Kornfeld Eliyahu PeterK J 2 Replies Last reply
                0
                • OriginalGriffO OriginalGriff

                  Herself is cooking a Full English Breakfast for Brunch! It's gotta be over a year since I last had one (she's on a diet, which means I am too) and I've missed 'em! Stuff the Granola - I'm having the real thing today. (And after a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows I damn well deserve it!)

                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                  Richard DeemingR Offline
                  Richard DeemingR Offline
                  Richard Deeming
                  wrote on last edited by
                  #8

                  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

                  "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                  OriginalGriffO 1 Reply Last reply
                  0
                  • Richard DeemingR Richard Deeming

                    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

                    OriginalGriffO Offline
                    OriginalGriffO Offline
                    OriginalGriff
                    wrote on last edited by
                    #9

                    It's all ancestors and descendants I needed - and I managed it quite well: Never really got my head round recursive CTE's though! :laugh:

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

                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                    J 1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      Welsh does that, quite a bit... :laugh: 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...

                      Kornfeld Eliyahu PeterK Offline
                      Kornfeld Eliyahu PeterK Offline
                      Kornfeld Eliyahu Peter
                      wrote on last edited by
                      #10

                      OriginalGriff wrote:

                      which tends to look like a stroke victim

                      And that explains why it is a hospital center... (according Wikipedia at least) :-D

                      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                      1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        Herself is cooking a Full English Breakfast for Brunch! It's gotta be over a year since I last had one (she's on a diet, which means I am too) and I've missed 'em! Stuff the Granola - I'm having the real thing today. (And after a morning spent working out SQL SP's to "find all Child" and "find all Parent" rows I damn well deserve it!)

                        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                        Mike HankeyM Offline
                        Mike HankeyM Offline
                        Mike Hankey
                        wrote on last edited by
                        #11

                        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!

                        OriginalGriffO 1 Reply Last reply
                        0
                        • Mike HankeyM Mike Hankey

                          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!

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #12

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

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          Mike HankeyM 1 Reply Last reply
                          0
                          • OriginalGriffO OriginalGriff

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

                            Mike HankeyM Offline
                            Mike HankeyM Offline
                            Mike Hankey
                            wrote on last edited by
                            #13

                            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!

                            OriginalGriffO 1 Reply Last reply
                            0
                            • Mike HankeyM Mike Hankey

                              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!

                              OriginalGriffO Offline
                              OriginalGriffO Offline
                              OriginalGriff
                              wrote on last edited by
                              #14

                              Sometimes, you gotta do it in the server. :sigh:

                              Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                              1 Reply Last reply
                              0
                              • OriginalGriffO OriginalGriff

                                It's all ancestors and descendants I needed - and I managed it quite well: Never really got my head round recursive CTE's though! :laugh:

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

                                J Offline
                                J Offline
                                Jorgen Andersson
                                wrote on last edited by
                                #15

                                Looks like you managed quite fine. Wait until you need to find the common ancestors of several nodes ;P (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.

                                Wrong is evil and must be defeated. - Jeff Ello

                                OriginalGriffO M 2 Replies Last reply
                                0
                                • J Jorgen Andersson

                                  Looks like you managed quite fine. Wait until you need to find the common ancestors of several nodes ;P (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.

                                  Wrong is evil and must be defeated. - Jeff Ello

                                  OriginalGriffO Offline
                                  OriginalGriffO Offline
                                  OriginalGriff
                                  wrote on last edited by
                                  #16

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

                                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                  "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                  1 Reply Last reply
                                  0
                                  • OriginalGriffO OriginalGriff

                                    Welsh does that, quite a bit... :laugh: 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...

                                    J Offline
                                    J Offline
                                    Jon McKee
                                    wrote on last edited by
                                    #17

                                    That spelling makes a lot of sense once you see how it's pronounced :omg:

                                    1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      It's never a pretty looking meal - it'd be thrown out of MasterChef on day one - but it's all about the flavours :cool:

                                      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                      D Offline
                                      D Offline
                                      den2k88
                                      wrote on last edited by
                                      #18

                                      MasterChef is a hoax, real people eat real food. MasterChef's recipes are too complex, only imaginary people can eat them.

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

                                      M B 2 Replies Last reply
                                      0
                                      • J Jorgen Andersson

                                        Looks like you managed quite fine. Wait until you need to find the common ancestors of several nodes ;P (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.

                                        Wrong is evil and must be defeated. - Jeff Ello

                                        M Offline
                                        M Offline
                                        Mycroft Holmes
                                        wrote on last edited by
                                        #19

                                        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

                                        J 1 Reply Last reply
                                        0
                                        • OriginalGriffO OriginalGriff

                                          It's never a pretty looking meal - it'd be thrown out of MasterChef on day one - but it's all about the flavours :cool:

                                          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                          X Offline
                                          X Offline
                                          xiecsuk
                                          wrote on last edited by
                                          #20

                                          So true, so true

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups