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. no of rows in sql stored procedure

no of rows in sql stored procedure

Scheduled Pinned Locked Moved Database
databasequestion
3 Posts 2 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.
  • S Offline
    S Offline
    Sakshi Smriti
    wrote on last edited by
    #1

    Hi I want to find out the no of rows returned by a select statement in a stored procedure within the stored procedure ie i have a select statement say select * from employees where deptid=2 now for the no of rows returned i want to perform a calculation for each row in the stored procedure itself how can i loop in it and get the no of rows and the records for each row to handle all these in the stored procedure rather than in the front end Waiting for reply Happy coding Subhash Subhash Chatterji

    E 1 Reply Last reply
    0
    • S Sakshi Smriti

      Hi I want to find out the no of rows returned by a select statement in a stored procedure within the stored procedure ie i have a select statement say select * from employees where deptid=2 now for the no of rows returned i want to perform a calculation for each row in the stored procedure itself how can i loop in it and get the no of rows and the records for each row to handle all these in the stored procedure rather than in the front end Waiting for reply Happy coding Subhash Subhash Chatterji

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      SQL cursor[^] to the rescue! ;)

      "A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin Edbert Sydney, Australia

      S 1 Reply Last reply
      0
      • E Edbert P

        SQL cursor[^] to the rescue! ;)

        "A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin Edbert Sydney, Australia

        S Offline
        S Offline
        Sakshi Smriti
        wrote on last edited by
        #3

        ya i got it thanks

        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