plsql错误无效号码
当我遇到无效号码错误时
procedure Afficher(opt int,id int) is
type emp is record(fn employees.first_name%type,
lname employees.last_name%type,
job jobs.job_title%type,
dep departments.department_id%type);
emp1 emp;
begin
select e1.first_name,e1.last_name,j.job_title,d.department_name into emp1
from employees e1 ,jobs j,departments d where e1.employee_id= 'id' and
e1.job_id=j.job_id and e1.department_id =d.department_id ;
dbms_output.put_line('Name Job Department');
dbms_output.put_line(emp1.fn||''|| emp1.lname||' '
||emp1.job||' '||emp1.dep);
end Afficher;
I'm getting an invalid number error when
procedure Afficher(opt int,id int) is
type emp is record(fn employees.first_name%type,
lname employees.last_name%type,
job jobs.job_title%type,
dep departments.department_id%type);
emp1 emp;
begin
select e1.first_name,e1.last_name,j.job_title,d.department_name into emp1
from employees e1 ,jobs j,departments d where e1.employee_id= 'id' and
e1.job_id=j.job_id and e1.department_id =d.department_id ;
dbms_output.put_line('Name Job Department');
dbms_output.put_line(emp1.fn||''|| emp1.lname||' '
||emp1.job||' '||emp1.dep);
end Afficher;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找
e1.employee_id='id'
;它实际上是一个字符串,还是一个数字?You're looking for
e1.employee_id='id'
; is it actually a string, or a number?您可能想要:
即 id 变量周围没有引号。
最好将变量重命名为 *emp_id* 或类似的名称。
You probably want:
I.e. no quotes around the id variable.
It's probably better to rename the variable to *emp_id* or something similar.