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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Do a simple Query for me

Do a simple Query for me

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

    Suppose a left table name is: tblstudent. Which has two column , studentID(KEY) and studentName. On the other hand right table name is tblMarks. In this first column is studentID(key) and second column is ‘Division’ of type bit. The student who got First class , with his respective name , Division value is entered 1.But student, who did not get First class, not entered in the table. Now what should be the query that presents first column all student name from left table(tblstudent) and second column Division with respect to name. Student who not get first class present as null value.

    A J S N 4 Replies Last reply
    0
    • S Saam_cse

      Suppose a left table name is: tblstudent. Which has two column , studentID(KEY) and studentName. On the other hand right table name is tblMarks. In this first column is studentID(key) and second column is ‘Division’ of type bit. The student who got First class , with his respective name , Division value is entered 1.But student, who did not get First class, not entered in the table. Now what should be the query that presents first column all student name from left table(tblstudent) and second column Division with respect to name. Student who not get first class present as null value.

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      You are joking of course. Why would anyone want to do your homework for you? Without even a please?

      Bob Ashfield Consultants Ltd

      L 1 Reply Last reply
      0
      • S Saam_cse

        Suppose a left table name is: tblstudent. Which has two column , studentID(KEY) and studentName. On the other hand right table name is tblMarks. In this first column is studentID(key) and second column is ‘Division’ of type bit. The student who got First class , with his respective name , Division value is entered 1.But student, who did not get First class, not entered in the table. Now what should be the query that presents first column all student name from left table(tblstudent) and second column Division with respect to name. Student who not get first class present as null value.

        J Offline
        J Offline
        John Gathogo
        wrote on last edited by
        #3

        SELECT tblStudent.StudentID, tblStudent.StudentName, tblMarks.Division FROM tblStudent LEFT OUTER JOIN tblMarks ON tblStudent.StudentID = tblMarks.StudentID

        1 Reply Last reply
        0
        • S Saam_cse

          Suppose a left table name is: tblstudent. Which has two column , studentID(KEY) and studentName. On the other hand right table name is tblMarks. In this first column is studentID(key) and second column is ‘Division’ of type bit. The student who got First class , with his respective name , Division value is entered 1.But student, who did not get First class, not entered in the table. Now what should be the query that presents first column all student name from left table(tblstudent) and second column Division with respect to name. Student who not get first class present as null value.

          S Offline
          S Offline
          shubhi
          wrote on last edited by
          #4

          In which database u want to run this??? following is for MS-Access ----------------------------- SELECT [studentName], [Division] FROM tblstudent LEFT JOIN tblMarks ON [tblstudent].[studentID]=[tblMarks].[studentID];

          "We can't solve problems by using the same kind of thinking we used when we created them"

          1 Reply Last reply
          0
          • A Ashfield

            You are joking of course. Why would anyone want to do your homework for you? Without even a please?

            Bob Ashfield Consultants Ltd

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

            To prevent that he understands what he is doing, in order to prevent him from getting a degree. If that fails, one of us might end up maintaining that code.. So, by all means, let's just answer all homework-questions :) --edit-- Answers only, off course! Explanation of an answer wouldn't help. If one does not want to learn, then don't push an explanation. Forced learning is plain rude :cool:

            A 1 Reply Last reply
            0
            • L Lost User

              To prevent that he understands what he is doing, in order to prevent him from getting a degree. If that fails, one of us might end up maintaining that code.. So, by all means, let's just answer all homework-questions :) --edit-- Answers only, off course! Explanation of an answer wouldn't help. If one does not want to learn, then don't push an explanation. Forced learning is plain rude :cool:

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              Tell you what, shall we set up a website to answer just homework questions - obviously, as they are students we wouldn't charge, and we could give up our paying jobs to run it? Just think of how many degress we could be responsible for globally! Of course, as we are (more or less) in the same time zone we would have to employ people (out of our own pockets, naturally) to answer urgent (aren't they always) questions during the European night. Good plan?

              Bob Ashfield Consultants Ltd

              L 1 Reply Last reply
              0
              • A Ashfield

                Tell you what, shall we set up a website to answer just homework questions - obviously, as they are students we wouldn't charge, and we could give up our paying jobs to run it? Just think of how many degress we could be responsible for globally! Of course, as we are (more or less) in the same time zone we would have to employ people (out of our own pockets, naturally) to answer urgent (aren't they always) questions during the European night. Good plan?

                Bob Ashfield Consultants Ltd

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

                That has been tried already, with various setups.. StackOverflow for the students, Rent-a-coder for the "urgentz codez". Aw, wait, Rent-a-coder isn't free, is it? ..the sad thing is, what you are describing is almost what we are doing now.

                1 Reply Last reply
                0
                • S Saam_cse

                  Suppose a left table name is: tblstudent. Which has two column , studentID(KEY) and studentName. On the other hand right table name is tblMarks. In this first column is studentID(key) and second column is ‘Division’ of type bit. The student who got First class , with his respective name , Division value is entered 1.But student, who did not get First class, not entered in the table. Now what should be the query that presents first column all student name from left table(tblstudent) and second column Division with respect to name. Student who not get first class present as null value.

                  N Offline
                  N Offline
                  nelsonpaixao
                  wrote on last edited by
                  #8

                  just grab a chair, i will post you the entire code in a few minutes ok? :laugh:

                  nelsonpaixao@yahoo.com.br trying to help & get help

                  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