delete the blob column
Hey all,.I have these tables:
Products
CREATE TABLE "COMPDB"."PRODUCTS"
( "PRO_ID" NUMBER NOT NULL ENABLE,
"PRO_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
"COMPETITOR" NUMBER NOT NULL ENABLE,
"CATEGORY" NUMBER NOT NULL ENABLE,
"INS_USER" VARCHAR2(50 BYTE),
"UPD_USER" VARCHAR2(50 BYTE),
"INS_DATE" DATE,
"UPD_DATE" DATE,
"VERSION" NUMBER,
"PHOTO" BLOB,
"FILENAME" VARCHAR2(255 BYTE),
"MIMETYPE" VARCHAR2(255 BYTE),
"LAST_UPDATE_DATE" DATE,
CONSTRAINT "PRODUCT_PK" PRIMARY KEY ("PRO_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB" ENABLE,
CONSTRAINT "PRO_CAT_FK" FOREIGN KEY ("CATEGORY")
REFERENCES "COMPDB"."CATEGORY" ("CAT_ID") ON DELETE CASCADE ENABLE,
CONSTRAINT "PRO_COMP_FK" FOREIGN KEY ("COMPETITOR")
REFERENCES "COMPDB"."COMPETITORS" ("COMP_ID") ON DELETE CASCADE ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB"
LOB ("PHOTO") STORE AS BASICFILE (
TABLESPACE "COMPDB" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_PRODUCTS_BRI" BEFORE
INSERT ON PRODUCTS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF :NEW.PRO_ID IS NULL THEN
SELECT PRODUCTS_SEQ.NEXTVAL INTO :NEW.PRO_ID FROM DUAL;
END IF;
:NEW.INS_USER := NVL(:NEW.INS_USER,Comm_Usermanagement.Get_Username);
:NEW.INS_DATE := sysdate;
:NEW.UPD_USER := NVL(:NEW.UPD_USER,Comm_Usermanagement.Get_Username);
:NEW.UPD_DATE := sysdate;
:NEW.VERSION := NVL(:NEW.VERSION,0);
END;
/
ALTER TRIGGER "COMPDB"."TRG_PRODUCTS_BRI" ENABLE;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_PRODUCTS_BRU" BEFORE
UPDATE ON PRODUCTS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF NOT UPDATING ('UPD_USER')
OR :NEW.UPD_USER IS NULL THEN :NEW.UPD_USER := Comm_Usermanagement.Get_Username;
END IF;
IF NOT UPDATING ('UPD_DATE') OR :NEW.UPD_DATE IS NULL THEN
:NEW.UPD_DATE := sysdate;
END IF;
IF NOT UPDATING ('VERSION') THEN
:NEW.VERSION := :OLD.VERSION + 1;
END IF;
END;
/
ALTER TRIGGER "COMPDB"."TRG_PRODUCTS_BRU" ENABLE;
Competitors: CREATE TABLE "COMPDB"."COMPETITORS"
( "COMP_ID" NUMBER NOT NULL ENABLE,
"COMP_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
"INS_USER" VARCHAR2(50 BYTE),
"UPD_USER" VARCHAR2(50 BYTE),
"INS_DATE" DATE,
"UPD_DATE" DATE,
"VERSION" NUMBER,
CONSTRAINT "COMPETITOR_PK" PRIMARY KEY ("COMP_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB" ;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_COMPETITORS_BRI" BEFORE
INSERT ON COMPETITORS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF :NEW.COMP_ID IS NULL THEN
SELECT COMPETITORS_SEQ.NEXTVAL INTO :NEW.COMP_ID FROM DUAL;
END IF;
:NEW.INS_USER := NVL(:NEW.INS_USER,Comm_Usermanagement.Get_Username);
:NEW.INS_DATE := sysdate;
:NEW.UPD_USER := NVL(:NEW.UPD_USER,Comm_Usermanagement.Get_Username);
:NEW.UPD_DATE := sysdate;
:NEW.VERSION := NVL(:NEW.VERSION,0);
END;
/
ALTER TRIGGER "COMPDB"."TRG_COMPETITORS_BRI" ENABLE;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_COMPETITORS_BRU" BEFORE
UPDATE ON COMPETITORS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF NOT UPDATING ('UPD_USER')
OR :NEW.UPD_USER IS NULL THEN :NEW.UPD_USER := Comm_Usermanagement.Get_Username;
END IF;
IF NOT UPDATING ('UPD_DATE') OR :NEW.UPD_DATE IS NULL THEN
:NEW.UPD_DATE := sysdate;
END IF;
IF NOT UPDATING ('VERSION') THEN
:NEW.VERSION := :OLD.VERSION + 1;
END IF;
END;
/
ALTER TRIGGER "COMPDB"."TRG_COMPETITORS_BRU" ENABLE;
Category
CREATE TABLE "COMPDB"."CATEGORY"
( "CAT_ID" NUMBER NOT NULL ENABLE,
"CAT_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
"INS_USER" VARCHAR2(50 BYTE),
"UPD_USER" VARCHAR2(50 BYTE),
"INS_DATE" DATE,
"UPD_DATE" DATE,
"VERSION" NUMBER,
CONSTRAINT "CATEGORY_PK" PRIMARY KEY ("CAT_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMPDB" ;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_CATEGORY_BRI" BEFORE
INSERT ON CATEGORY REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF :NEW.CAT_ID IS NULL THEN
SELECT CATEGORY_SEQ.NEXTVAL INTO :NEW.CAT_ID FROM DUAL;
END IF;
:NEW.INS_USER := NVL(:NEW.INS_USER,Comm_Usermanagement.Get_Username);
:NEW.INS_DATE := sysdate;
:NEW.UPD_USER := NVL(:NEW.UPD_USER,Comm_Usermanagement.Get_Username);
:NEW.UPD_DATE := sysdate;
:NEW.VERSION := NVL(:NEW.VERSION,0);
END;
/
ALTER TRIGGER "COMPDB"."TRG_CATEGORY_BRI" ENABLE;
CREATE OR REPLACE TRIGGER "COMPDB"."TRG_CATEGORY_BRU" BEFORE
UPDATE ON CATEGORY REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN IF NOT UPDATING ('UPD_USER')
OR :NEW.UPD_USER IS NULL THEN :NEW.UPD_USER := Comm_Usermanagement.Get_Username;
END IF;
IF NOT UPDATING ('UPD_DATE') OR :NEW.UPD_DATE IS NULL THEN
:NEW.UPD_DATE := sysdate;
END IF;
IF NOT UPDATING ('VERSION') THEN
:NEW.VERSION := :OLD.VERSION + 1;
END IF;
END;
/
ALTER TRIGGER "COMPDB"."TRG_CATEGORY_BRU" ENABLE;
Now my problem:To remove the blob (content) column in the products and the columns, which belong to this column (Filename, Mimetype, Last_update_date).
EMPTY_BLOB() does not work :-/
as the null value.
I can always download the file, although I can see null in this column in sql developer.
I hope someone can help.
Locke90210 wrote:
I can always download the file, although I can see null in this column in sql developer.
I hope someone can help.
What code did you use to set the null values?
Have you clicked on the button "validation"?
(and, Yes, this should be in the SQL forum)
MK
Tags: Database
Similar Questions
-
Deleting the BLOB file by users
My application displays BLOB files. How / what steps should I follow to allow users to delete the BLOB file themselves? I use interactive report to view the files and giving the download option that works very well. I need to provide the option for the user to delete the file as well but am stuck on this for a while now. Please help me.
Thank you
Swetha
Deletion and modification functionality, you need are already present in page 4 via the process of FRA and ARP generated by the wizard. You did not just providing a link to the page that passes the value of the ID of existing lines.
See copy app 38544. I added a link to the column of the report on page 6 that passes the ID of the line on page 4. Details of the selected file are displayed, and it is possible to replace the BLOB content using the browse file or set the line removed using the delete key.
Alternatively, you can add a checkbox column to the report on page 6 using the
apex_item.checkbox2
method of the API, a delete button to submit the page and a process of page after submit PL/SQL it to remove the saved files. -
compress the blob column to save space on the server
Hi friends,
I have a problem with the blob column, in the oracle 11.2.0.4 on aix Server database
I have a table with a blob of column (containing a jpg file). This table is in a tablespace of 300 GB and storage space is full. There is no space on the server (asm).
I need to load the jpg more in this table, but there is no space.
I've read a few articles on tha compress blob type column, but I'm not sure what I should do.
Is it possible to compress the blob column without going to a different tablespace (because the server has no more space to create a new one).
The table and column have been created in a traditional way.
Please, advice?
Best regards
Dbape.
But this method requires add-on EA "Adv. Compression" ($$$).
OP he wanted to compress .jpg files.
BUDOKAI
It is not possible.
the .jpg files are already compressed.
IIRC (of my Compression Adv. test) - SecureFile "knows best" and will not try to compress BLOBs identified as JPGs or any other known formats of files (such as .zip files)
In other words - SecureFile is not the OP no good for the type of data, it is try to compress them.
Are the only solutions that the OP has to enable it to store more JPG images
- get rid of the old pictures
- Add more disks
- resize images (ordimage)
- recompress the image by reducing the quality as long as the resulting image is unusable (ordimage)
MK
-
When we prepare the statement to insert a row that contains the Blob column. Is what sense this correct? And what is the difference? Does anyone know?
1 Preparestatement.setBlob(parameter number, blob type object)
2 Preparestatement.setBlob(parameter number, inputstream type object)
This link shows the test I did.
https://community.Oracle.com/thread/3680185?SR=Inbox & customTheme = OTN
When we prepare the statement to insert a row that contains the Blob column. Is what sense this correct? And what is the difference? Anyone know?
1 Preparestatement.setBlob(parameter number, blob type object)
2 Preparestatement.setBlob(parameter number, inputstream type object)
I answered in your other thread and provided a link to the JDBC Dev Guide section, which explains how to work with type LOB and BFILE data.
Have you read this article from doc?
Did you read my response to your other thread?
In java, a BLOB is just the index that gives you access to the content. In your case, you access by selecting a locator BLOB existing and getting his inputstream. This inputstream is what allows you to access the content real blob.
The Locator is just that; It specifies the LOCATION of the blob content, but NOT the content.
-
Stored in the BLOB column display PDF problem
Hello everyone.
I tried to follow this tutorial http://asktom.oracle.com/pls/asktom/f?p=100:11:0:p11_question_id:232814159006 on the display of PDF files stored in BLOB columns. This is done on Apex 4.2, with my DB 11 g running. I have my procedure, which I will post below:
I am trying to run this through a region dynamic PL/SQL, and even if I don't get any error, the content displayed is a huge mess of truncated text and strange characters. I tried to run this procedure on many other types of documents, including word and jpeg image files, all with the necessary changes in my inside, and regardless of what I use, I always get a big mess of strange characters. Does anyone have information or ideas why this is happening?create or replace procedure "PDF" (p_id IN gvo_documents.doc_id%type) is l_lob blob; l_amt number default 30; l_off number default 1; l_raw raw(4096); begin select contents into l_lob from gvo_documents where doc_id = p_id; -- make sure to change this for your type! owa_util.mime_header( 'application/pdf' ); begin loop dbms_lob.read( l_lob, l_amt, l_off, l_raw ); htp.prn( utl_raw.cast_to_varchar2( l_raw ) ); l_off := l_off+l_amt; l_amt := 4096; end loop; exception when no_data_found then NULL; end; end;
If I understand correctly, your needs must be broken down into two problems:
1) click the link that opens a window showing a new APEX page
(2) an APEX page displays the document, download it not.I did not (yet) #1.
However, you can generate a URL that points to the new page in the select for the report.It's a related issue, but no response yet:
Open the pdf file in the browser windowThe key is to target = "_blank" to the anchor tag.
To generate the URL, you must use the APEX_UTIL.prepare_URL () function.If this does not work, a dynamic Action that makes magical things of JavaScript may be necessary.
# 2, I lost the URL that showed how to display a PDF file in a page "form.
From what I remember:
Start with a blank page with a pristine area of HTML (all items will in the HTML area)
Add an element to the PK/annual
part I forgot Create a Data Manipulation process
-Automated row Fetch
-By loading - after the header
-(stuff for your table/view)
part I forgot Create a (I think) "File browser" item type. For the parameters:
-Storage of Type "BLOB column specified in the Source element" (and put the name of the BLOB column)
-MIME Type column: (column name) - since there are several types, this is a MUST HAVE
-Filename column: (column name) - I highly recommend you have this.
-Provision of content is INLINE<-- this="" is="" the="">-->In addition, you will need a browser for each of the Types MIME Plugin (if not, the browser may try to "Download" the file)
Browsers can manage the types of images internally. Plugin Adobe can handle PDF files. I do not know Word/Excel.Yet once again, I don't remember the exact details, but that should cover most of it.
MK
-
Interactive report will not save the BLOB column attributes
I created several interactive reports with the 4.0 and 4.1 which had columns of type BLOB with no problems and the download link worked fine. After 4.2 update, interactive reports get the following error when you click on the download link:
Not found
The requested URL /apex/apex_util.get_blob was not found on this server
If I open the edit page of the report, the BLOB downloads very well. When I looked at the report in detail the attributes of the BLOB column, I noticed that the BLOB column attributes had not been met. I tried several times to fill in (name of the Table column name, Primary Key, MIMETYPE, etc), but after applying changes and reopen the attributes page for the blob column, the values, that I entered is not saved.
For completeness, here is the select statement for the report:
Select "DESC_ATT_ID."
"BR_ID,"
"FILENAME."
"MIME TYPE"
DBMS_LOB. GetLength ("DESC_ATTACHMENT") 'DESC_ATTACHMENT '.
of ' #OWNER # '. " ALTEC_BR_DESC_ATT ".
WHERE BR_ID =: P3_BR_ID
Also, here is the value for the number/Date of the BLOB column format:
DOWNLOAD: ALTEC_BR_DESC_ATT:DESC_ATTACHMENT:DESC_ATT_ID
Can someone tell me please in the right direction to get the link to the interactive report work correctly?
Thank you very much
JerryHello
How about you, you do not format BLOB column, do you it manually like this example here:Apex. Oracle.com
workspace: somefeto
user: test
PWD: test
Application 63066in the same workspace, there is Sample File Upload and Download (App ID 10540), and it works very well...
If not, Pls, reproduce the problem on apex.oracle.com
Best regards
Fateh
------
If you believe that my answer is correct or helpful to you pls, then mark the reply as useful or correct -
How to stop the blob column don't affect display performance.
Hello
I have an external table that has a blob column. The table has at present about 40 recordings that the blob column is reading in some 150 MB total records. When I try to view the external table performance is terrible, takes to always display the table. I thought far around from this would be to create a view that would leave the blob column, in an attempt to show folders quickly, but it has no impact on performance.
Is it possible to create the view that returns the columns I want quickly for these 40 weird files?
BenBenton says:
Hello
I have an external table that has a blob column. The table has at present about 40 recordings that the blob column is reading in some 150 MB total records. When I try to view the external table performance is terrible, takes to always display the table. I thought far around from this would be to create a view that would leave the blob column, in an attempt to show folders quickly, but it has no impact on performance.Is it possible to create the view that returns the columns I want quickly for these 40 weird files?
Ben
You can try to create 2 external tables out of this file, without the BLOB column and another containing the BLOB column.
Then query the external table BLOBless when you have no need for the BLOB.
-
Update the Blob column by replacing a string...
Hello
I have a table T1 with a (large binary BLOB) column, I need (you) to update the Blob string with replacement of a chain (in the Blob) with another string.
The update failed: ORA-00933: not correctly completed SQL command
CREATE table T1
(
ID NOMBRE (12) PAS NULL,
DELIVERY_CONTENT BLOB ,
)
Update T1 The VALUE DELIVERY_CONTENT = LOB_UTL_PCKG . BLOBREPLACE ()DELIVERY_CONTENT 'old_string' 'new_string'( )
WHERE ID in (...)
ORA-00933: SQL not correctly completed command
I use a function LOB_UTL_PCKG . BLOBREPLACE starting from this package
CREATE OR REPLACE PACKAGE LOB_UTL_PCKG
IS
FUNCTION BLOBREPLACE ()p_blob BLOB p_what VARCHAR2 p_with_what VARCHAR2() RETURN BLOB
FUNCTION BLOB2CLOB (p_blob BLOB) RETURN CLOB ;
FUNCTION CLOB2BLOB (p_clob CLOB) RETURN BLOB ;
END;
/
CREATE OR REPLACE PACKAGE BODY LOB_UTL_PCKG
IS
FUNCTION BLOBREPLACE ()p_blob BLOB p_what VARCHAR2 p_with_what VARCHAR2()RETURN BLOB
IS
START
RETURN CLOB2BLOB () REPLACE (BLOB2CLOB()p_blob), p_what p_with_what( ) );
END BLOBREPLACE ;
------------------------------ BLOB2CLOB -------------------------
FUNCTION BLOB2CLOB (p_blob in BLOB) RETURN CLOB
IS
v_clob CLOB ;
dest_offset INTEGER := 1 ;
offset INTEGER := 1 ;
lang_context INTEGER := DBMS_LOB. DEFAULT_LANG_CTX;
warning INTEGER ;
START
DBMS_LOB. CREATETEMPORARY ( ) v_clob TRUE );
DBMS_LOB. CONVERTTOCLOB( )
v_clob ,
p_blob ,
DBMS_LOB. LOBMAXSIZE,
dest_offset ,
offset ,
DBMS_LOB. DEFAULT_CSID,
lang_context ,
warning
);
RETURN v_clob ;
END BLOB2CLOB ;
------------------------------ CLOB2BLOB -------------------------
FUNCTION CLOB2BLOB (p_clob CLOB) RETURN BLOB
ACE
l_blob BLOB ;
l_dest_offset INTEGER := 1 ;
l_source_offset INTEGER := 1 ;
l_warning INTEGER ;
lang_context INTEGER := DBMS_LOB. DEFAULT_LANG_CTX;
START
DBMS_LOB. CREATETEMPORARY()l_blob TRUE);
DBMS_LOB. CONVERTTOBLOB( )
l_blob ,
p_clob ,
DBMS_LOB. LOBMAXSIZE,
l_dest_offset ,
l_source_offset ,
DBMS_LOB. DEFAULT_CSID,
lang_context ,
l_warning
);
RETURN l_blob ;
END CLOB2BLOB ;
END;
/
Concerning
Djam
It works well for me.
Update T1 SET DELIVERY_CONTENT is LOB_UTL_PCKG. BLOBREPLACE (DELIVERY_CONTENT, 'old_string', 'new_string')
Where IDSQL > 2 = 1;
0 lines to date.
-
Delete the last column in a table
Hey there,
is it possible that a script selects the last column of a table (there are tables with columns 3 and 4 on a page) and deletes it?
And is it possible that this is happening on a specific layer?
Greetings
Hi, ELP,.
Use the code below:
//remove column var myTable = app.activeDocument.stories.everyItem().tables.everyItem().columns[-1].remove(); //remove column with layer var myTable = app.activeDocument.stories.everyItem().tables.everyItem().getElements(); alert(myTable.length) for(i=0; i
Concerning
Siraj
-
How to insert data into the BLOB column
Hi all
Can someone help me to insert data in the BLOB data type column?
The structure of the table is
CREATE TABLE XXATFL_DM_FORCAST_STG
(
TASK_ID NUMBER,
USER_ID NUMBER,
CREATED_BY NUMBER (15),
CREATION_DATE DATE,
LAST_UPDATED_BY NUMBER (15),
DATE OF LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN NUMBER (15),
RECORD_STATUS VARCHAR2 (1 BYTE),
ERROR_MESSAGE VARCHAR2 (4000 BYTE),
DATA_FILE BLOB
)
I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.
Please help me as soon as possible because it is very urgent for me
Thank you and best regards,
CharrierCharrier,
If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.
http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086
sql> create table t( 2 id number, 3 l_blob blob 4 ); sql> insert into t values(1, utl_raw.cast_to_raw('SampleString')); 1 row created. sql> commit; Commit complete.
-
Should be a simple question: How do I search for properties of the BLOB columns?
Hi people,
It's just out of my mind. How can I get a BLOB properties using the query?
I have a table with a BLOB column where documents are stored. I would like to get information on the size of each BLOB content.
How to find the DOCUMENT_TEXT properties (size)?SQL> desc document Name Type Nullable Default Comments ----------------- ------------- -------- ------- -------- OBJECT_ID NUMBER TIMESTAMP DATE sysdate TITLE VARCHAR2(200) Y DOCUMENT_TYPE NUMBER Y DOCUMENT_FILENAME VARCHAR2(200) Y DOCUMENT_TEXT BLOB Y
Thank you
Tomasdbms_lob.getlength(document_text)
-
Downloading files from the blob column
Hello
I had the file it is implemented for the database blob column using the document below:
http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#85
Now can someone please tell me how to download or view the file from the database blob column?
I use jdev 11
Thank youHello
At the end of your download method invoke:
ActualExceptionIter.executeQuery ();
Kuba
-
Load the BLOB column in Oracle to an Image column in MS SQL Server
Hello
I have an Oracle table as the source and a MS SQL Server table as a target. A blob column (4000) in the source is mapped to a column (2147483647) Image in the target.
Execution will give me the error message "* java.lang.NumberFormatException: for the input string:"4294967295"*"when it comes to step 'load the data into the staging of table' '.
The LKM that I use is LKM SQL for MSSQL.
I also tried LKM SQL for MSSQL (BULK), LKM SQL for SQL (jython), LKM SQL for SQL. None of them are useful.
Impossible, someone tell me how to fix this 4294967295? Thank you very muchHi Yang,
Oracle recommends the setting of the 'get_lob_precision' false flag to avoid this error.
For this,.
1. make a backup of your ODIPARAM. BAT file.
2. open ODIPARAM. BAT file and add the following line.Set ODI_ADDITIONAL_JAVA_OPTIONS = % ODI_ADDITIONAL_JAVA_OPTIONS % ""-Doracledatabasemetadata.get_lob_precision = false ' "
Next to
Set ODI_ADDITIONAL_JAVA_OPTIONS = ""-Djava.security.policy = server.policy ' "
PS:If, the parameter is defined, the result "ODI_ADDITIONAL_JAVA_OPTIONS" ("SNP_ADDITIONAL_JAVA_OPTIONS" or "SNP_JAVA_OPTIONS") should be similar to the foregoing.
Restart the ODI and try.
Thank you
G -
cfquery MVS DB2 table that contains the BLOB column
Using ColdFusion MX 7. Capable of converting the BLOB in a string when the data source is in UDB (our database development) However, when the data source change to MVS DB2 (database Production and staging) model renders are more data on the screen.
model code snippet:
...
< cfoutput >
< name cfquery = "acct_selector" datasource = "#request.ds #" >
SELECT DISTINCT * from dbo. Account
where cf_token = ' #cftoken # ' and cf_pid = ' #cfid # ' and account_system! = « I »
order of account_num
< / cfquery >
< cfset acctname = arraynew (1) >
< cfset acctnumb = arraynew (1) >
< cfset i = 1 >
< cfloop query = "acct_selector" >
< cfset = account_name acctname >
< cfset acctnumb= account_num >
< cfset i = i + 1 >
< / cfloop >
< cfset rpdt1 = dateformat(sDate,"yyyy-mm-dd") & "-00.00.00.000000" >
< cfset rpdt2 = dateformat(sDate,"yyyy-mm-dd") & "-23.59.59.999999" >
< name cfquery = "reflexReport" datasource = "#request.db2 #" >
Select reflex_rpt_id, account_num, report_tmstp, sequence_num, fk_report_typ, report_txt
of #request.db2qlfr # .gzb005_reflex_rpt
where (< cfloop query = "acct_selector" > account_num = "#account_num #" or < / cfloop > account_num = '0' ")
and report_tmstp > = "#rpdt1 #" and report_tmstp < = "#rpdt2 #
< / cfquery >
< / cfoutput >
< cfif reflexReport.recordcount gt 0 >
... (constructed here report headings)...
< cfoutput query = "reflexReport" >
< cfset rpdata = tostring (report_txt) >
....
I know that there are lines that are selected in the cursor, because headers are displayed on the browser page. If no row is selected the process appears a user informed alert window there is no data to report for the selected date.
I had a misunderstanding of what version of DB2 my request was connect on Z/OS. It turns out that it's the best before DATE of DB2 for Z/OS 7.1.0 which does not support BLOB of CFMX 7. We ended up writing a call to a J2EE servlet that calls existing methods within a service.
-
Delete the entire column (of an array) If you have specific words
Can someone help me?
I have a document of great size with plenty of tables.
The tables have the same structure:
a line with the title and under different columns, where the latter is a price list.
The first word of this last column is the PRICE, and we need, is that all cells (with content) that are below this cell to be eliminated PRICES...
I tried to do with this: https://forums.adobe.com/thread/1533114?q=delete%20rows
but the first abolition of PRICE all the words, but with this script are the lines, not the deleted columns...
Can someone help me?
Thanks in advance!
Try this,
var doc = app.activeDocument, _cells = doc.stories.everyItem().tables.everyItem().cells.everyItem().getElements(); for ( var k = _cells.length-1; k>= 0; k-- ) { try{ if ( _cells[k].contents == "PRICE" ) _cells[k].columns[0].remove(); }catch(e){}; }
Maybe you are looking for
-
The windows are constantly flashing and goes black. I'm almost ready to go back to IE.
The interface is slow accepting typing. Menu drop down windows go black and I have to point them to see the content sometimes, I take the bad selectiondue for the flashing window and shift in time
-
The VI call on the n-th loop iteration
Hi all I have a VI (let's call this VI1) looking for something like the one below. How do I get it to call/run another VI (let's call VI2) when I = 2. I can't put VI2 in the loop because VI2 must be made independently, and VI1 loop should not wait
-
The problem is that the machine freezes completely without apparent reason, on all operating systems, I tried. "Freezes", I mean there is no reaction to the mouse movements, keyboard presses and start button / stop pressed off the coast. The gel se
-
Acceleration of approval of push notification service
I wonder if there's a place I can reach out to the acceleration to the top of my push notification service application. Five days seems a bit long to test the existing integration with my Android build. Anyone has any advice to help get things moving
-
Hi, how can I get rid of Windows Media Center-uninstall it.
I have Windows 7, some how I got it and can't uninstall it. Please help I want to restore the system and the appears.