• 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!

Oracle stored proc simple problem

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

    #21
    Sounds like this project is going to hell in a handcart.
    What happens in General, stays in General.
    You know what they say about assumptions!

    Comment


      #22
      Originally posted by MarillionFan View Post
      Sounds like this project is going to hell in a handcart.
      It was destined to do that the day SY submitted his application form.

      A little knowledge is a dangerous thing as this topic clearly demonstrates.
      merely at clientco for the entertainment

      Comment


        #23
        Leave the coding for the Bobs.
        Originally posted by MaryPoppins
        I'd still not breastfeed a nazi
        Originally posted by vetran
        Urine is quite nourishing

        Comment


          #24
          This is why Oracle does my f****** nut in.

          Consider the following stored procedure call :

          Code:
          DECLARE
          commentTypeId integer;
          BEGIN
          Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
          END;
          According to the examples on the web this is fine. According to the examples given on here this is fine.

          According to the SQL Developer tools THIS IS NOT FINE.

          PLS-00103: Encountered the symbol SP_ADD_COMMENT_TYPE when expecting one of the following ......
          I have tried it with and without EXEC. I have tried it with and without CALL. I have tried it in SQL+.

          Knock first as I might be balancing my chakras.

          Comment


            #25
            I haven't got a clue but have you tried it without the space:

            Exec SP_ADD_COMMENT_TYPE('New comment Type', commentTypeId);
            Most programming languages don't have a space between a function and parameters...
            Brexit is having a wee in the middle of the room at a house party because nobody is talking to you, and then complaining about the smell.

            Comment


              #26
              Originally posted by darmstadt View Post
              I haven't got a clue but have you tried it without the space:



              Most programming languages don't have a space between a function and parameters...
              Most - C-style anyway - allow it though Worth a try though.
              Originally posted by MaryPoppins
              I'd still not breastfeed a nazi
              Originally posted by vetran
              Urine is quite nourishing

              Comment


                #27
                Code:
                DECLARE
                commentTypeId integer;
                IS
                BEGIN
                Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
                END;
                is what I think is missing.
                merely at clientco for the entertainment

                Comment


                  #28
                  Oracle is rusty, but don't you need a colon in front of the variable?

                  And it's not got a value - what's it trying to do?

                  Comment


                    #29
                    have you tried CALL instead of EXEC?
                    Coffee's for closers

                    Comment


                      #30
                      Originally posted by suityou01 View Post
                      This is why Oracle does my f****** nut in.

                      Consider the following stored procedure call :

                      Code:
                      DECLARE
                      commentTypeId integer;
                      BEGIN
                      Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
                      END;
                      According to the examples on the web this is fine. According to the examples given on here this is fine.

                      According to the SQL Developer tools THIS IS NOT FINE.



                      I have tried it with and without EXEC. I have tried it with and without CALL. I have tried it in SQL+.

                      This is supposed to work
                      Code:
                      DECLARE
                      commentTypeId integer;
                      BEGIN
                       SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
                      END;
                      But if that isn't working then it may indicate that there is something wrong with the SP..or a permissions issue. Like the execute privilege is not granted to you...which would be odd if you created the SP.

                      You're using SQL Developer so when you look at the SP in the procedures 'folder' is there a 'x' next to the SP?
                      McCoy: "Medical men are trained in logic."
                      Spock: "Trained? Judging from you, I would have guessed it was trial and error."

                      Comment

                      Working...
                      X