|
|
Re: How to store the zip file in oracle table ? [message #361631 is a reply to message #361614] |
Thu, 27 November 2008 03:51   |
rangan.s
Messages: 75 Registered: February 2008 Location: chennai
|
Member |
|
|
SQL> DESC BLOB_TABLE;
Name Type Nullable Default Comments
---- ------- -------- ------- --------
A INTEGER Y
B BLOB Y
SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
ORA-00904: "BLOB": invalid identifier
SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
ORA-00907: missing right parenthesis
SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
ORA-01465: invalid hex number
SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
|
|
|
|
|
|
|
|
|
Re: How to store the zip file in oracle table ? [message #361688 is a reply to message #361663] |
Thu, 27 November 2008 08:37  |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Theology notwithstanding, the most straightforwards way to do it from Pl/Sql is this:
1) Create a Directoyr that points to the physical directory holding the Zip file
2) Create a Bfile locator that points to the zip file
3) Use Dbms_Lob.loadfromfile to load the dats from this Bfile into the BLOB.
here's an example
|
|
|