I would like to take the most I can of the first 4000 characters to fit into a 4000-byte maximum field (paradoxically, 4000 bytes is the limit even for misleading VARCHAR2(4000 CHAR) fields in Oracle 11).
The alternatives I see are:
substr(NCLOB_COLUMN, 1, 4000)
-- no good, 4000 characters can often be more than 4000 bytesdbms_lob.substr(NCLOB_COLUMN, 4000, 1)
-- no good, 4000 characters can often be more than 4000 bytes (see also How to Copy Only First 4000 Characters from Oracle NCLOB to NVARCHAR2(4000) Value?)substr(NCLOB_COLUMN, 1, 1000)
-- no good, I can usually get a lot more than 1000 characterssubstrb(NCLOB_COLUMN, 1, 4000)
-- no good, generates ORA-22998 error
Any other ideas?