I have a procedure I need to feed a number into in order to generate some thumbnails.
I'm trying to automatically update the value every time a new row is inserted but I'm having trouble with the code.
DECLARE
varInt NUMBER :='SELECT MAX(IMAGE_ID) FROM IMAGES';
begin
create_blob_thumbnail(varInt);
end;
I get the error 'ORA-06502: PL/SQL: numeric or value error: character to number conversion error'
If I run the query SELECT MAX(IMAGE_ID) FROM IMAGES, it returns the last row ID I created just as it should.
The create_blob_thumbnail(varInt) procedure works fine if I manually put in a number.
Searched for ages and tried a lot of different things, anyone have any suggestions?