• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Bob update

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Originally posted by suityou01 View Post
    I was always lead to believe that Oracle (ANSI) SQL was the pure form and Microsoft created their own variant.
    According to the wikipedia page that just told me what PL/SQL was, PL/SQL and Oracle SQL are two different languages, among three that Oracle supports natively. I presume "Oracle SQL" is what I would regard as SQL.

    Comment


      #62
      Originally posted by pacharan View Post
      This app you're writing, it's not for Granada Service Stations by any chance is it?
      Reminds me of a website I found while doing a government contract. You can see how bored I was;

      Granada - Motorway Services Online

      Amazing that someone can actually make a website with the look and feel of a 1970s motorway services.
      And what exactly is wrong with an "ad hominem" argument? Dodgy Agent, 16-5-2014

      Comment


        #63
        Originally posted by Mich the Tester View Post
        Reminds me of a website I found while doing a government contract. You can see how bored I was;

        Granada - Motorway Services Online

        Amazing that someone can actually make a website with the look and feel of a 1970s motorway services.
        I worked on that!

        Did you know that if you click on certain elements on the home page in a certain sequence it brings up a page showing cheats for all the fruitees installed at Granada service stations.

        Need a lot of positive rep before I reveal details of that

        Comment


          #64
          Originally posted by suityou01 View Post
          I was always lead to believe that Oracle (ANSI) SQL was the pure form and Microsoft created their own variant. A bit like javascript vs MS Javascript.

          Sounds plausible. The panel think what?
          Oracle isn't ANSI, though.

          Oracle only introduced the ANSI join syntax with 9i, for example.
          Best Forum Advisor 2014
          Work in the public sector? You can read my FAQ here
          Click here to get 15% off your first year's IPSE membership

          Comment


            #65
            Originally posted by suityou01 View Post
            OK so this is the example where the cursor is being used :

            The screen in question creates a row in a table called dinner. There is a child table called dinner_item which will hold all of the dinner items.

            In the meta data we define for each type of dinner, what the default set of dinner items are.

            So for cooked breakfast we have :

            Fried tomato
            Bacon
            Beans
            Sausage
            Mushrooms

            So when we create a dinner row, we want to automajically populate the dinner items from the meta data. So the cursor would open the list of dinner_items from the meta data, and then pop one row in the dinner_item table.

            It could be done from the application layer, but this would not only perform better but would be easier to change the stored procedure than rush out a new version of the app.

            The stored procedure debate trundles on, but we were forced into using stored procs as Oracle doesn't have an identity field, so we need to use sequences so this is all wrapped up in the insert stored proc, and the new id value returned as an output variable.
            When you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.

            Assuming this is your table structure

            Dinner
            ----------
            DinnerId int
            DinnerName nvarchar(50)

            DinnerItem
            ----------
            DinnerItemId int
            ItemName nvarchar(50)
            DinnerId

            DinnerItemMetaData
            --------------
            Id int
            ItemName nvarchar(50)


            Why cant you just do this ?

            DECLARE @DinnerId int
            INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')

            SELECT @DinnerId = @@Identity

            INSERT INTO DinnerItem(ItemName,DInnerId)
            SELECT ItemName, @DinnerId FROM DinnerItemMetaData
            Vote Corbyn ! Save this country !

            Comment


              #66
              Originally posted by fullyautomatix View Post
              When you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.

              Assuming this is your table structure

              Dinner
              ----------
              DinnerId int
              DinnerName nvarchar(50)

              DinnerItem
              ----------
              DinnerItemId int
              ItemName nvarchar(50)
              DinnerId

              DinnerItemMetaData
              --------------
              Id int
              ItemName nvarchar(50)


              Why cant you just do this ?

              DECLARE @DinnerId int
              INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')

              SELECT @DinnerId = @@Identity

              INSERT INTO DinnerItem(ItemName,DInnerId)
              SELECT ItemName, @DinnerId FROM DinnerItemMetaData


              Top work. Made my evening that. Stick to mopping out the bogs mate.

              What a complete tit.
              Knock first as I might be balancing my chakras.

              Comment


                #67
                Originally posted by fullyautomatix View Post
                When you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.

                Assuming this is your table structure

                Dinner
                ----------
                DinnerId int
                DinnerName nvarchar(50)

                DinnerItem
                ----------
                DinnerItemId int
                ItemName nvarchar(50)
                DinnerId

                DinnerItemMetaData
                --------------
                Id int
                ItemName nvarchar(50)


                Why cant you just do this ?

                DECLARE @DinnerId int
                INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')

                SELECT @DinnerId = @@Identity

                INSERT INTO DinnerItem(ItemName,DInnerId)
                SELECT ItemName, @DinnerId FROM DinnerItemMetaData
                Because it's Oracle dumbo.

                To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.

                Jeez, ever wondered why an Oracle licence costs like £5bn per server?



                Comment


                  #68
                  Originally posted by DimPrawn View Post
                  Because it's Oracle dumbo.

                  To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.

                  Jeez, ever wondered why an Oracle licence costs like £5bn per server?



                  He posted earlier in the thread. Just obviously doesn't follow the
                  • Read the thread
                  • Think before typing
                  • Now post


                  Rule of thumb

                  Knock first as I might be balancing my chakras.

                  Comment


                    #69
                    Originally posted by suityou01 View Post
                    He posted earlier in the thread. Just obviously doesn't follow the
                    • Read the thread
                    • Think before typing
                    • Now post

                    Rule of thumb

                    Mmmm. I wonder what I'd been doing wrong. Thanks for the first two steps.

                    Oh, yes. Chutney.
                    What happens in General, stays in General.
                    You know what they say about assumptions!

                    Comment


                      #70
                      Originally posted by DimPrawn View Post
                      Because it's Oracle dumbo.

                      To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.

                      Jeez, ever wondered why an Oracle licence costs like £5bn per server?



                      Cut him some slack - he's obviously been on the mushrooms.

                      You probably want to be using SCOPE_IDENTITY anyway (assuming you change your db strategy and go with SQL Server).
                      +50 Xeno Geek Points
                      Come back Toolpusher, scotspine, Voodooflux. Pogle
                      As for the rest of you - DILLIGAF

                      Purveyor of fine quality smut since 2005

                      CUK Olympic University Challenge Champions 2010/2012

                      Comment

                      Working...
                      X