hi
i created function after i using in table this is working success but one or some error came in the table .
how is identify particular error in unit tesing?
hi
i created function after i using in table this is working success but one or some error came in the table .
how is identify particular error in unit tesing?
Please pass more information using correct english and grammar.
What exactly the error you are getting?
this is interview qns?
one function working successfully, project finished.
i checking unit testing that time error would came in particular row error.
how can find error?
then how can modified function.
your question is still not clear.
>>how can find error?
you may find errors using
show errors function functionname;
or
you may also use user_errors.
Select * from user_erros.
>>one function working successfully
the function may become invalid as a result of changes done on dependent objects. Then you need to recompile the function as follows
alter function functioname compile;
>>then how can modified function
query to get source code of a function is
select text from user_source
where type='function'
and name='functionname'
order by line
thank for ur answer
but
function is correct i applied on table . error came two or some only record . i found error in unit testing.data is more how can get particular error
how can find paricular error
can i use exception.
but interview person told dbms_output.
how is possible
>>but interview person told dbms_output.
Yes you can use dbms_output for testing purpose. Using dbms_output you may find for which record you are getting error. Here is the example using procedure.
create or replace procedure test_emp as
v_count number:=1;
begin
for v_cur in (select * from emp)
loop
dbms_output.put_line('Record Number ' || V_count);
insert into emp values(
v_cur.EMPNO,
v_cur.ENAME,
v_cur.JOB,
v_cur.MGR,
v_cur.HIREDATE,
v_cur.SAL,
v_cur.COMM,
v_cur.DEPTNO
);
v_count := v_count +1;
end loop;
commit;
end;
/
thanks for ur answer.