Home » Developer & Programmer » Forms » how to join tables in a cursor (oracle 10g)
how to join tables in a cursor [message #543320] Tue, 14 February 2012 02:32 Go to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
hi, i'd like to join tables in a cursor.

I tried coding this way...

   CURSOR studgrade_cur IS
      SELECT g.stud_id, g.grade, subj_code, s.description
        FROM studgrades g JOIN subjects s
         ON(g.subj_code = s.subj_code)
         	 WHERE stud_id = :Studentprofile.student_id;


but i got an error, saying:

Quote:
encountered the symbol JOIN when expecting one of the following:

,; for group having intersect minus order start union where
connect


Is it not allowed to use JOIN statement in a cursor?
Re: how to join tables in a cursor [message #543331 is a reply to message #543320] Tue, 14 February 2012 03:25 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
What version of forms are you using?
Re: how to join tables in a cursor [message #543337 is a reply to message #543331] Tue, 14 February 2012 03:42 Go to previous messageGo to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
10.2.0 ^^
Re: how to join tables in a cursor [message #543342 is a reply to message #543337] Tue, 14 February 2012 04:55 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
That should work in 10g forms. Are you sure it's not an older version?
Just use the non-ansi syntax:
   CURSOR studgrade_cur IS
      SELECT g.stud_id, g.grade, subj_code, s.description
        FROM studgrades g , subjects s
         WHERE g.subj_code = s.subj_code
         	 AND stud_id = :Studentprofile.student_id;
Re: how to join tables in a cursor [message #543343 is a reply to message #543342] Tue, 14 February 2012 05:58 Go to previous message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
thanks it works ^^
Previous Topic: How to Clear Record?
Next Topic: Access more than one form in the same time
Goto Forum:
  


Current Time: Sat Jul 13 12:41:00 CDT 2024