PL/SQL (MOSC)

MOSC Banner

Cannot update data on a table

edited Jan 13, 2014 11:14PM in PL/SQL (MOSC) 16 commentsAnswered ✓
I have loaded some data in a temp table . Then I have written a script to update data from temp to main table.  But i am getting an error invalid number.
Data type in temp table is varchar
Data type in main table is number

 begin
  FOR C IN (select ITEM_CODE ,FJAN ,FFEB ,FMAR ,FAPR ,FMAY ,FJUN ,FJUL ,FAUG ,FSEP,FOCT ,FNOV ,FDEC from grays_sales_forecasts_temp)
  
  LOOP
        update grays_sales_forecasts_t
        set FDEC = to_number(c.FDEC)
        where ITEM_CODE = C.ITEM_CODE;  
       END LOOP;
  end  ;



Could anyone help.

BTW I hav been able to update the other fields except for FDEC.

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