943,621 Members | Top Members by Rank

Ad:
  • Oracle Discussion Thread
  • Unsolved
  • Views: 1418
  • Oracle RSS
Nov 16th, 2008
0

Problem with pl/sql report

Expand Post »
Hi there!

Ive been working on my relational schema for a while now and just recently managed to implement it. I wanted experiment a little with it so ive decided to produce a report displaying relevant information. At the moment my schema only consists of 3 tables : a 'student' table, a 'course' table and a student 'next-of-kin' table. The pk for student is named 'studentNo', the same goes for 'course' and 'next-of-kin' ('courseNo', 'next_of_kinNo'). 10 entries have been made so far for both 'student' and 'next_of_kin'.

The report i intend to produce will need to display a list of students studying 1 common course (Business Studies, courseNo : '12885545'). The report should be ordered by studentNo.

This is what i have already come up with:

Oracle Syntax (Toggle Plain Text)
  1. --set echo off
  2. --set pagesize 24
  3. --set feedback off
  4. --set linesize 78
  5. col A format 99999999 heading 'Student No'
  6. col B format A15 heading 'Student Name'
  7. col C format A15 heading 'Course Name'
  8. col D format 99999999 'Course No'
  9. col E format A10 heading 'Next-of-Kin'
  10. break ON A skip 1 ON B
  11. TTitle 'Business Studies 1 Option BT300'
  12. BTitle 'Prepared By : Richard Stroud / 20527796'
  13. SELECT StudentNo A,
  14. fName || ' ' || lName B,
  15. title C,
  16. courseNo D,
  17. fName || ' ' || lName E,
  18.  
  19. FROM student A, course B, next_of_kin C
  20. WHERE B.courseNo = 12885545
  21. ORDER BY studentNo
  22. --clear columns
  23. --TTitle off
  24. --BTitle off
  25. --set feedback on
  26. --set pagesize 24
  27. --clear breaks

When i execute the above i am prompted with an 'unknown column option "Course" error message.

I will greatly appreciate any help in regards to this issue

~ Richard
Last edited by peter_budo; Nov 18th, 2008 at 6:54 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rich_da_prog is offline Offline
1 posts
since Oct 2006
Nov 20th, 2008
0

Re: Problem with pl/sql report

why using same alias for the table name and column name ?
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Oracle Forum Timeline: how do I nest a CASE statement in an INNER JOIN
Next Thread in Oracle Forum Timeline: join in oracle





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC