• 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

    #71
    Stop posting proper coding in General, you're ruining it. SY, go back to telling us how great you are rather than posting your shoddy code to try and prove it.
    Originally posted by MaryPoppins
    I'd still not breastfeed a nazi
    Originally posted by vetran
    Urine is quite nourishing

    Comment


      #72
      The best approach to the above is to generate the keys in the ETL tool and then load the data using SQL*Loader. But I'm guessing since you're doing INSERTs that the volumes dont justify a proper ETL tool.
      "A life, Jimmy, you know what that is? It’s the s*** that happens while you’re waiting for moments that never come." -- Lester Freamon

      Comment


        #73
        Originally posted by eek View Post
        Ever heard of triggers?
        Only fools and cursors?
        While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

        Comment


          #74
          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.
          There are easier ways to lose weight than this sort of extreme calorie counting.
          While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

          Comment


            #75
            On a serious note you do realise you can insert multiple rows using a sequence with something like

            insert into dinner_items select seq.nextval, data from dinner_items_metadata where dinner_type = 'lardarse deluxe combo'

            don't you?
            While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

            Comment


              #76
              Anyone who still uses Oracle should be taken outside and shot in front of their families.

              Comment


                #77
                Originally posted by russell View Post
                Anyone who still uses Oracle should be taken outside and shot in front of their families.
                Anyone who uses Oracle would never find a women let alone get it up enough to have kids.
                What happens in General, stays in General.
                You know what they say about assumptions!

                Comment


                  #78
                  Originally posted by russell View Post
                  Anyone who still uses Oracle should be taken outside and shot in front of their families.
                  Why?
                  While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

                  Comment


                    #79
                    Originally posted by doodab View Post
                    Why?
                    Probably because it's no faster than the competition, no more reliable than the competition, no more productive than the competion, no more feature rich than the competition, but costs a LOT more than the competition.

                    A bit like paying Mercedes money for a Kia.

                    Comment


                      #80
                      Originally posted by DimPrawn View Post
                      Probably because it's no faster than the competition, no more reliable than the competition, no more productive than the competion, no more feature rich than the competition, but costs a LOT more than the competition.

                      A bit like paying Mercedes money for a Kia.
                      I resemble that remark

                      Comment

                      Working...
                      X