This content has been marked as final. Show 3 replies
IF APEX_COLLECTION.COLLECTION_EXISTS( p_collection_name => 'CLOB_CONTENT' ) THEN APEX_COLLECTION.TRUNCATE_COLLECTION( p_collection_name => 'CLOB_CONTENT' ); ELSE APEX_COLLECTION.CREATE_COLLECTION( p_collection_name => 'CLOB_CONTENT' ); END IF;
apex_collection.create_or_truncate_collection(p_collection_name => 'CLOB_CONTENT');
I have to admit I didn't think this would work. But I've just tried it quickly on our customer site and it did! Thank you. I need to try it on our dev environment to be sure, but it does appear to work. How strange.
Can Oracle provide an answer to why this would work and the other way wouldn't? Is create_or_truncate no longer available from 4.2?
PS. Will provide points when I've check solution in dev environment.... :-)
Yes, some times APEX behaves weirdly, we had this issue when we use create_or_truncate procedure in on-load page process and if we call this page as pop-up using jQuery dialog. If we run page normally, then this issue was not coming. However handling create and truncate explicitly solved the problem. Strange, but that is how it is!
Is create_or_truncate no longer available from 4.2?No, see this