SQLLOAD long raw data type
Date: 1998/01/20
Message-ID: <885322412.417005578_at_dejanews.com>#1/1
Hi,
I have a bunch of TIFF files that I would like to put them into an import file and use direct SQLLOAD for loading.
- How do I stack these TIFF files into a big file for importing?
Currently I'm using this technique below to load images into NT/SQL Server. I have a C program that uses "fread" function to read each byte from a TIFF image file into a buffer then "fwrite" function to write that buffer into the import file. At the end of each image in the import file, I have the delimiter as "|||||\n" (that is 5 pipe symbols and new line) to signal the end of one image. This method works for NT/SQL Server because its load utility (bcp) allows the delimiter length longer than 1 char. However, Oracle only allows the delimiter length to be 1 char long. How should I solve this problem in Oracle? What should the delimiter be?
2) Assume that #1 is answered, what should the control file look like?
This is the sample format file for load the images into NT/SQL Server binary_docs.fmt
1 SQLCHAR 0 10 "|" 1 document_id 2 SQLCHAR 0 3 "|" 2 page_num 3 SQLCHAR 0 12 "|" 3 file_spec 4 SQLIMAGE 0 65000 "|||||\n" 4 contents
This is a sample data file.
binary_docs.IMP
1 | 1 | image_1 | bytes of image_1 |||||\n 2 | 1 | image_2 | bytes of image_2 |||||\n 3 | 1 | image_3 | bytes of image_3 |||||\netc.
Thanks,
Chris Pham
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Tue Jan 20 1998 - 00:00:00 CET