Skip to content

Commit 5aa79b7

Browse files
Merge pull request #146 from Trivadis/bugfix/issue-135-missing-into
Bugfix/issue 135 missing into
2 parents 328ced3 + b5b6e54 commit 5aa79b7

File tree

1 file changed

+6
-4
lines changed
  • docs/4-language-usage/8-patterns/3-validating-input-parameter-size

1 file changed

+6
-4
lines changed

docs/4-language-usage/8-patterns/3-validating-input-parameter-size/g-8310.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ This technique raises an error (`value_error`) which may not be handled in the c
1313
create or replace package body department_api is
1414
function dept_by_name(in_dept_name in departments.department_name%type)
1515
return departments%rowtype is
16-
l_return departments%rowtype;
16+
r_return departments%rowtype;
1717
begin
1818
if in_dept_name is null or length(in_dept_name) > 20 then
1919
raise err.e_param_to_large;
2020
end if;
2121
-- get the department by name
2222
select *
23+
into r_return
2324
from departments
2425
where department_name = in_dept_name;
2526

26-
return l_return;
27+
return r_return;
2728
end dept_by_name;
2829
end department_api;
2930
/
@@ -36,14 +37,15 @@ create or replace package body department_api is
3637
function dept_by_name(in_dept_name in departments.department_name%type)
3738
return departments%rowtype is
3839
l_dept_name departments.department_name%type not null := in_dept_name;
39-
l_return departments%rowtype;
40+
r_return departments%rowtype;
4041
begin
4142
-- get the department by name
4243
select *
44+
into r_return
4345
from departments
4446
where department_name = l_dept_name;
4547

46-
return l_return;
48+
return r_return;
4749
end dept_by_name;
4850
end department_api;
4951
/

0 commit comments

Comments
 (0)