How do I CAST a NUMBER to VARCHAR2 in Oracle?
The function you're looking for is TO_CHAR
:
tmp := TO_CHAR(LINE_ID);
You can't specify NUMBER
precision and scale for a function's parameter. Just declare it like this:
CREATE OR REPLACE FUNCTION MyFunction2(LINE_ID NUMBER)