Loading ...
Sorry, an error occurred while loading the content.

10646Re: [PkOug] Need Query

Expand Messages
  • Shah Zahid
    Nov 6, 2013
    • 0 Attachment

      select student_reg_no,

                                  listagg(course_id, ‘,’)

      within group

      (order by student_reg_no) students_reg_no

      From course

      Group by student_reg_no

      On Tue, Nov 5, 2013 at 12:05 PM, Majid Tahir <tahir.majid@...> wrote:

      Dear Members,
      I have following tables

      table student:

      student_name       student_reg_no
      ali                                  1
      tahir                                2

      table course

      student_reg_no            course id
                1                             1
                 1                            2
                 1                            3
      I need a query to represent the course in single coulumns
      student_reg_no                 course id
      1                                         1,2,3

      how can i write this query, kindly help

    • Show all 9 messages in this topic