Hi
What is my misstake? I got error whwn I run my code!

DECLARE
V_num number := ‘&enter_an_integer’;
V_test number;

Begin
V_test := mod(V_num,2);
If V_test = 0 then
Dbms_output.put_line(’even number’)
Else
Dbms_output.put_line(‘odd numbers’);
End if;
End;



The error was
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

Recommended Answers

All 4 Replies

Line 2. You are assigning a string to a number.

Thanks and whats the right way?

whats the right way?

The right way for what?

I'm not understand your sulotion?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.