read first 1kb of a blob from oracle
Posted
by Angus
on Stack Overflow
See other posts from Stack Overflow
or by Angus
Published on 2010-05-10T04:22:14Z
Indexed on
2010/05/10
4:28 UTC
Read the original article
Hit count: 314
Hi,
I wish to extract just the first 1024 bytes of a stored blob and not the whole file. The reason for this is I want to just extract the metadata from a file as quickly as possible without having to select the whole blob.
I understand the following:
select dbms_lob.substr(file_blob, 16,1) from file_upload where file_upload_id=504;
which returns it as hex. How may I do this so it returns it in binary data without selecting the whole blob?
Thanks in advance.
© Stack Overflow or respective owner