oracle - Converting input values to date and varchar2 -
- How can I convert the input code to
DATE
? - How can I convert the input code to
VARCHAR2
?
I get an error:
ORA-06550: line 8, column 60:
Piels -0,200,201: identifier declared 'n' should - ORA -0650: line 8, column 1 9:
PL / SQL: item neglected
06550. 00000 - "line% s, column% s: \ n% s"
* reason Usually a PL / SQL compilation error
My code is:
on the SET server; - Oracle SQL Developer is working for - Deleting the variable input Dts are vegzams_number EXAM.egzams_number% TYPE: = & amp; Input_number_of_egzam; Vid_student EXAM.ID_STUDENT% TYPE: = & amp; Input_id_student; Vid_subject EXAM.id_subject% TYPE: = & amp; Input_id_subject; Vid_teacher EXAM.id_teacher% Type: = & amp; Input_id_teacher; Vid_place_of_exam EXAM.id_place_of_exam% TYPE: = & amp; Input_id_place_of_exam; - Problems with these two versions here vexams_date EXAM.exams_date% TYPE: = TO_DATE (& input_date_of_egzam); Vgot_a_mark EXAM.got_a_mark% TYPE: = TO_CHAR (and Input_guard_mark_t_of_bad_N); - Declaration of Variable for Input Diet - Command_text VARCHAR2 (200); - For the examinations for the INSERT examination exams - EXAM% rowtype; --dling table - cursor declaration select cursor c_exams egzams_number, ID_STUDENT, id_subject, id_teacher, exams_date, id_place_of_exam, got_a_mark the test; --prokeder Insert announced methodology Insert_row (Pegajham_anmber number Piaidi_student these numbers, pid_subject IN number, pid_teacher IN number, pexams_date IN DATE, Pid_place_of_exam number, Pgood IN varchar2) BEGIN command_text: = 'V2 ,: v3 ,: v4 ,: v5 ,: V6 ,: v7) '; Use EXECTIE immediate Kmmand_tekst to Pegajhms_anmber, Piaidi_student, Piaidi_sbakt, Piaidi_tekr, Pecsams_det, Piaidi_of_ Aksam, Pigud; COMMIT; End; - Publish End BEGIN - Initialization OPEN c_exams; I Dbms_output.put_line ('date:' || exams_rec.exams_date) in exams_reck; Closed c_exams; End; When using the replacement variable, you do not need to include string values (but numbers). Excerpt:
as a date value, which is failing anyway ... This was probably a mistake on data entry or definition.vexams_date EXAM.exams_date% TYPE: = TO_DATE ('& amp; input_dataoff_geam');
Whatever value you supply is interpreted as an identifier without citing it, and there is no table / column / local variable with that name. You can also look at the calculation errors because they can look like numerical expressions (03/11/2014, for example, 0.000135 ...), which is either
to_date
Or 03 / November).If you turn on
Verify on the set
then you can see the values before and after attempting to interpret; By error you appear to provide the code as 'N'You should also specify the format model being expected rather than trusting your existing NLSDNETAETAMAT.
If your next variable string is assumed, you do not need
to_char
, just quotation;vgot_a_mark EXAM.got_a_mark% Type: = '& amp; Input_guard_mark_t_of_bad_N ';
Comments
Post a Comment