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. Stored procedure

Stored procedure

Scheduled Pinned Locked Moved Database
database
3 Posts 3 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
    sidbaruah
    wrote on last edited by
    #1

    Hi friends!!! I have a table where i have a set of tutor ids and the relevant points they get according to a student. table is like student_name // tutor1_id // points // tutor2_id // points .... john // 101 // 4 // 102 // 5 jacob // 102 // 3 // 105 // 4 and another table tutor_id // tutor_name 101 ron 102 reid 103 abc ... I need to show the points the tutor name and the student name together with a join among the two tables.. Right now i am using union operator for getting all the records Is there any other method how i can get all the details together Thanks for your time...

    I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

    M P 2 Replies Last reply
    0
    • S sidbaruah

      Hi friends!!! I have a table where i have a set of tutor ids and the relevant points they get according to a student. table is like student_name // tutor1_id // points // tutor2_id // points .... john // 101 // 4 // 102 // 5 jacob // 102 // 3 // 105 // 4 and another table tutor_id // tutor_name 101 ron 102 reid 103 abc ... I need to show the points the tutor name and the student name together with a join among the two tables.. Right now i am using union operator for getting all the records Is there any other method how i can get all the details together Thanks for your time...

      I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

      M Offline
      M Offline
      mamatha_raghu
      wrote on last edited by
      #2

      hi try this query select t1.student_name,t2.tutor_name ,t1.points from table1 t1,table2 t2 where t1.tutor1_id=t2.tutor_id ...... but i think u should not maintain the table1 like this (as u did) try this way... studentname//tutor//points john // 101 // 4 john// 102 // 5 and so on if u feel its voilating normalization then split it into two tables. happy coding:)

      1 Reply Last reply
      0
      • S sidbaruah

        Hi friends!!! I have a table where i have a set of tutor ids and the relevant points they get according to a student. table is like student_name // tutor1_id // points // tutor2_id // points .... john // 101 // 4 // 102 // 5 jacob // 102 // 3 // 105 // 4 and another table tutor_id // tutor_name 101 ron 102 reid 103 abc ... I need to show the points the tutor name and the student name together with a join among the two tables.. Right now i am using union operator for getting all the records Is there any other method how i can get all the details together Thanks for your time...

        I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

        P Offline
        P Offline
        Pratik Vasant Shah
        wrote on last edited by
        #3

        Hi, Can u please tell me what is the exact output u require. Also can u please provide me with the table structure of the first table student_name // tutor1_id // points // tutor2_id // points ... what does this ... indicate

        Thanking you in Advance Regards Pratik Shah

        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