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. Database & SysAdmin
  3. Database
  4. complilation error on stored procedure using sql???????????????

complilation error on stored procedure using sql???????????????

Scheduled Pinned Locked Moved Database
databasehelpquestionannouncement
10 Posts 5 Posters 0 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.
  • U Offline
    U Offline
    User 13014901
    wrote on last edited by
    #1

    create or replace procedure updateStudentResult(id int, m1 in int, m2 in int, m3 in int, tot out int, avg out float, grd out char) as begin select marks1,marks2,marks3 into m1,m2,m3 from students where sid=id; tot:=m1+m2+m3; avg:=(m1+m2+m3)/3; if avg >= 85 then grd:='A'; elsif (avg >= 65) then grd:='B'; elsif (avg >= 50) then grd:='C'; else grd:='D'; end if; UPDATE students SET total=tot, average=avg, grade=grd where sid=id; end; /

    L Richard DeemingR Z 4 Replies Last reply
    0
    • U User 13014901

      create or replace procedure updateStudentResult(id int, m1 in int, m2 in int, m3 in int, tot out int, avg out float, grd out char) as begin select marks1,marks2,marks3 into m1,m2,m3 from students where sid=id; tot:=m1+m2+m3; avg:=(m1+m2+m3)/3; if avg >= 85 then grd:='A'; elsif (avg >= 65) then grd:='B'; elsif (avg >= 50) then grd:='C'; else grd:='D'; end if; UPDATE students SET total=tot, average=avg, grade=grd where sid=id; end; /

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Do you have a question or are you just trying to showcase your code?

      1 Reply Last reply
      0
      • U User 13014901

        create or replace procedure updateStudentResult(id int, m1 in int, m2 in int, m3 in int, tot out int, avg out float, grd out char) as begin select marks1,marks2,marks3 into m1,m2,m3 from students where sid=id; tot:=m1+m2+m3; avg:=(m1+m2+m3)/3; if avg >= 85 then grd:='A'; elsif (avg >= 65) then grd:='B'; elsif (avg >= 50) then grd:='C'; else grd:='D'; end if; UPDATE students SET total=tot, average=avg, grade=grd where sid=id; end; /

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

        You have already posted this in QA: How to reslove this SQL stored procedure statement in oracle[^] You didn't explain the problem there, either.


        "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

        1 Reply Last reply
        0
        • U User 13014901

          create or replace procedure updateStudentResult(id int, m1 in int, m2 in int, m3 in int, tot out int, avg out float, grd out char) as begin select marks1,marks2,marks3 into m1,m2,m3 from students where sid=id; tot:=m1+m2+m3; avg:=(m1+m2+m3)/3; if avg >= 85 then grd:='A'; elsif (avg >= 65) then grd:='B'; elsif (avg >= 50) then grd:='C'; else grd:='D'; end if; UPDATE students SET total=tot, average=avg, grade=grd where sid=id; end; /

          Z Offline
          Z Offline
          ZurdoDev
          wrote on last edited by
          #4

          Fix the compilation error that it tells you about.

          There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

          1 Reply Last reply
          0
          • U User 13014901

            create or replace procedure updateStudentResult(id int, m1 in int, m2 in int, m3 in int, tot out int, avg out float, grd out char) as begin select marks1,marks2,marks3 into m1,m2,m3 from students where sid=id; tot:=m1+m2+m3; avg:=(m1+m2+m3)/3; if avg >= 85 then grd:='A'; elsif (avg >= 65) then grd:='B'; elsif (avg >= 50) then grd:='C'; else grd:='D'; end if; UPDATE students SET total=tot, average=avg, grade=grd where sid=id; end; /

            Z Offline
            Z Offline
            ZurdoDev
            wrote on last edited by
            #5

            It looks like you downvoted my post and that's fine; however, the reason I said to fix the compilation error is because you haven't even shared with us what the exact error is, so how can we possibly help you fix it?

            There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

            L 2 Replies Last reply
            0
            • Z ZurdoDev

              It looks like you downvoted my post and that's fine; however, the reason I said to fix the compilation error is because you haven't even shared with us what the exact error is, so how can we possibly help you fix it?

              There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

              L Offline
              L Offline
              LOKENDRA YADAV
              wrote on last edited by
              #6

              u can tell me to mention,not suppose to give slogans

              Z 1 Reply Last reply
              0
              • Z ZurdoDev

                It looks like you downvoted my post and that's fine; however, the reason I said to fix the compilation error is because you haven't even shared with us what the exact error is, so how can we possibly help you fix it?

                There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                L Offline
                L Offline
                LOKENDRA YADAV
                wrote on last edited by
                #7

                issue is solved now thankss i will keep ur suggestions in my mind, but you should tell in descent way

                Z 1 Reply Last reply
                0
                • L LOKENDRA YADAV

                  u can tell me to mention,not suppose to give slogans

                  Z Offline
                  Z Offline
                  ZurdoDev
                  wrote on last edited by
                  #8

                  3 people tried to nudge you in the right direction and you downvoted all of them. You still haven't given us the exact error. We're all volunteers and we're being very polite in trying to help you. If you called up tech support and said "I'm getting an error on my computer." of course the first question will be, "What is the error?" Same thing in an online forum. If you ask us how to fix an error, then tell us the error. There are 42,654,344 possible errors so we can't possibly guess which one you are getting. Plus, the error probably tells you exactly what is wrong and if you would just read it, you probably wouldn't even need our help.

                  There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                  L 1 Reply Last reply
                  0
                  • L LOKENDRA YADAV

                    issue is solved now thankss i will keep ur suggestions in my mind, but you should tell in descent way

                    Z Offline
                    Z Offline
                    ZurdoDev
                    wrote on last edited by
                    #9

                    LOKENDRA YADAV wrote:

                    issue is solved now

                    Good. Glad to hear it.

                    LOKENDRA YADAV wrote:

                    , but you should tell in descent way

                    I think all 3 of us were very polite. Sorry if you felt different.

                    There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                    1 Reply Last reply
                    0
                    • Z ZurdoDev

                      3 people tried to nudge you in the right direction and you downvoted all of them. You still haven't given us the exact error. We're all volunteers and we're being very polite in trying to help you. If you called up tech support and said "I'm getting an error on my computer." of course the first question will be, "What is the error?" Same thing in an online forum. If you ask us how to fix an error, then tell us the error. There are 42,654,344 possible errors so we can't possibly guess which one you are getting. Plus, the error probably tells you exactly what is wrong and if you would just read it, you probably wouldn't even need our help.

                      There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                      L Offline
                      L Offline
                      LOKENDRA YADAV
                      wrote on last edited by
                      #10

                      ohk cool bro am new here ,In a hurry i forget it happens sometime sorry next tym i will keep this in mind thanks for going through my code

                      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