ORACLE SQL STATEMENT IGNORED missing parentheses right [closed]

0

I can not find any missing parentheses in the line set project.activity.full_in = TO_NUMBER, I have reviewed it 20 times and the parentheses close well, I have 2 errors: ORA 00907 missing parentheses right and in the previous line to that it says SQL statement ignored.

CODE:

Note: It is a procedure to register activity, before this there is more but I did not want to saturate with code

select proyecto.activity.available_space into espacio_disp from proyecto.activity ;
if (espacio_disp = 1 )then  --si solo le queda un espacio lo agrego y pongo los dias en que lo llene

update proyecto.activity
set proyecto.activity.available_space =  proyecto.activity.available_space - 1
where proyecto.activity.id_activity = pid_activity ;

update proyecto.activity 
set proyecto.activity.full_in =   TO_NUMBER( '(select to_char(sysdate,'DD') from dual)' )  -  TO_NUMBER( '(select to_char(proyecto.activity.creation_date,'DD') from PROYECTO.ACTIVITY) ' )  
where proyecto.activity.id_activity = pid_activity ;

insert into proyecto.user_x_activity(id_user_x_activity, id_user, id_activity, id_event)
values (vid_user_x_activity, pid_user, pid_activity, pid_event);


else --si le quedan mas de  1 espacio
    
asked by AleBerto56 04.10.2018 в 22:33
source

1 answer

1

The detail was in the TO_NUMBER which is not for what reason had to have the second parameter that indicated the length of the number to convert

    
answered by 06.10.2018 в 15:19