Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007

    Unanswered: convert standard select to loop input

    I have a standard select script that has an input option for student id and want to convert this sql to pl/sql with a loop for the input. My attempt for this caused the following error: PLS-00428: an INTO clause is expected in this SELECT statement.
    please help, this is my code.
    thanks is advance.
    stid number(9);
    stid := '&ssn_id';
    exit when stid is null;
    ncrbio1_ssn stssn, ncrbio1_full_name stname, ncrbio1_street ststreet,
    ncrbio1_city stcity, ncrbio1_zip stzip,
    ncrbio1_phone sttel, ncrbio1_qtrs stqtrs, ncrbio1_trs sttrs,
    ncrbio1_clks stclks, ncrbio1_clke stclke, ncrbio1_chs stchs,
    ncrbio1_che stche, ncrbio1_cgpa stcgpa, ncrbio1_vsat stvsat,
    ncrbio1_msat stmsat, ncrbio1_cppr stcppr, ncrbio1_cppm stcppm,
    ncrbio1_cppl stcppl, ncrbio1_maj stmaj, ncrbio1_adv stadv,
    ncrbio1_sex stsex, ncrbio1_race strace, ncrbio1_aid staid,
    ncrbio1_dom stdom,
    ncrbio2_course tcourse, ncrbio2_hours thours, ncrbio2_grade tgrade,
    ncrbio2_separater tsep
    ncrbio1_table, ncrbio2_table
    ncrbio1_ssn = '&ssn_id'
    and ncrbio1_ssn = ncrbio2_ssn(+)
    order by
    ncrbio1_ssn, tcourse;
    end loop;

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    This is a BAD idea on a couple of levels.
    If a problem can be solved using SQL, then PL/SQL should NOT be used.
    PL/SQL runs deep inside the database engine & has no mechanism to "accept input" directly from any remote client.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts