Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
SammyDodger
Starting Member
2 Posts |
Posted - 2014-03-02 : 09:56:37
|
I'm trying to create a procedure which gets the module information by student id. quote: SET SERVEROUTPUT ON;CREATE OR REPLACE PROCEDURE get_modules_info_by_student_id (student_id NUMBER) AS v_name modules.name%TYPE; v_created date modules.created date%TYPE; BEGIN SELECT name, created DATE INTO v_name, v_created DATE, v_hire_date, v_update_date FROM courses WHERE student_id = student_id; DBMS_OUTPUT.PUT_LINE('Student_ID: ' || student_id); DBMS_OUTPUT.PUT_LINE('name: ' || v_name); DBMS_OUTPUT.PUT_LINE('created_date: ' || v_created DATE); EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE('Student_ID ' || student_id || ' not found.');end;/Warning: Procedure created with compilation errors.SQL> SHOW ERROR;Errors for PROCEDURE GET_MODULES_INFO_BY_STUDENT_ID:LINE/COL ERROR-------- -----------------------------------------------------------------5/19 PLS-00103: Encountered the symbol "MODULES" when expecting one of the following: := . ( @ % ; not null range with default character
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-03-02 : 10:05:41
|
This is ms sql server forum. The posted code doesnt look like T-SQL. Please post in relevant forums.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
SammyDodger
Starting Member
2 Posts |
Posted - 2014-03-02 : 10:13:24
|
Oh right. I'm using Oracle |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-03-02 : 12:46:54
|
try you luck at forums like www.orafaq.com------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|