Copy a client file to a large object

The following example uses the lobs table created in Using lld_create.

In the example, the lld_fromclient function in the first SELECT statement, copies the client file, quote2.txt, to an lld_locator row in the lobs table.
Figure 1: Copy a client file to a large object
-- Copy a client file to an lld_locator 
select lld_fromclient ('quote2.txt', lo) from lobs where key = 2;


(expression)  ROW('IFX_CLOB      ','clob:ffffffffa6b7c8d9000000020000000300
          0000090000001a0000000000010000000000000ad3c3dc000000000b06eec8000
          00000005c4e6000607fdc000000000000000000000000',NULL) 


select lo.lo_pointer::clob from lobs where key = 2;


(expression)  
To be or not to be,
that is the question.

The lld_fromclient function returns a pointer to the lld_locator row that identifies the data copied from the large object. The first SELECT statement returns this lld_locator row.

The next SELECT statement selects the lo_pointer field of the lld_locator row, lo.lo_pointer, and casts it to CLOB type data. The result is the data itself.