PL/SQL (MOSC)

MOSC Banner

Issue while creating a seq file :: ORA-06502: PL/SQL: numeric or value error: character to

edited Oct 8, 2012 5:07AM in PL/SQL (MOSC) 5 commentsAnswered
Hi ,

I'M facing an issue like, one time the file is creating fine with same logic ...eg:  PIPC12000001.txt

but next time I'M using the same logic then it's giving the above error and also sometimes it is creating like this way PIDOH121.txt. even i have converted into to_number() but it's still giving the above error. I need file name like PIDOH12000001.txt , PIDOH12000002.txt ......etc,

NOTE: datafile_name column size is  VARCHAR2(20).

DECLARE

v_seq             NUMBER;
  v_filecount     NUMBER;
  v_y1           VARCHAR2 (10):=TO_CHAR(SYSDATE,'YY');
  v_y2           VARCHAR2 (10); v_datafile_name         VARCHAR2 (200);

BEGIN

    BEGIN
       SELECT count(*)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center