Scalable Database Server, HiRDB Version 8 UAP Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
4.14.2 Examples of using the addition update and partial extraction facility for BLOB data
(1) Addition update of BLOB data
Multiple files are stored as one BLOB data element.
![[Figure]](FIGURE/ZU041301.GIF)
- Explanation
- The BLOB data of file 1 is inserted in column C2 of row A in the target table (T1).
- The BLOB data of file 2 is added by concatenating the data to column C2 of row A. The same applies when subsequent data is added.
(2) Partial extraction of BLOB data
The BLOB data of file 2 is extracted from the BLOB data (column C2) in row A that was stored in Addition update of BLOB data.
![[Figure]](FIGURE/ZU041302.GIF)
- Explanation
- The SUBSTR scalar function is used to extract data from the starting position (byte (100
1024 + 1) = byte 102401) of the data column for file 2 in column C2 of row A. Only the amount of data equivalent to the length of the data column in file 2 (200
1024 = 204800 bytes) is extracted.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.