Getting length of CLOB
Hi,
I have a CLOB column in my table which stores XML values. I need to get size of XML stored.
but when i am using length fucntion of oracle,it is giving error character string buffer too small.
can anyone suggest a way out to find the length of CLOB column.
my actual requirement is that i want to create a view in base table with all the field and one more field which will have length of CLOB column value.
Regards,
Vikas
so, it's an XML now?
select dbms_lob.getlength (extract (str, '/*').getClobVal())
from testas in
SQL> with test
2 as
3 (
4 select xmltype ('<this>test</this>') str from dual
5 ) -- End of Test. Here's the query:
6 select dbms_lob.getlength (extract (str, '/*').getClobVal())
7 from test
8 /
DBMS_LOB.GETLENGTH(EXTRACT(STR,'/*').GETCLOBVAL())
17
SQL>
Similar Messages
-
How to get length of data on column with long datatype
How to get length of data on column with long datatype without using pl/sql block
...another reason not to use LONG datatype for columns.
Oracle advises to switch to LOB columns instead
SQL> create table t
2 (x long)
3 /
Table created.
SQL> insert into t values (rpad ('x', 10000, 'x'))
2 /
1 row created.
SQL> alter table t
2 modify x clob
3 /
Table altered.
SQL> desc t
Name Null? Type
X CLOB -
SQLloder scripts not getting generated for CLOBs
I am trying to migrate MYSQL 3.23 database into Oracle 8.1.7 and after creating the Oracle model and after converting the MYSQL text datatype into CLOB of the Oracle model the SQLloader scripts is not getting generated for CLOB datatypes. I mean the scripts are getting created but there is no change in the script for CLOB datatype.
The script generates the following for the table containing CLOB datatypes:
mysqldump -h <HOST> -u <USERNAME> -p<PASSWORD> -T <DESTINATION_PATH> fields-terminated-by="<ec>" lines-terminated-by="<er>" test av_wbt_course
Please let me know how to load data when the datatype is of CLOB ?I was able to resolve this issue by using OWM Oracle Migration instead of using offline method by sqlloader scripts.
-
How to get length of a data field
Hi Experts,
How to get length of a data field. For example data field /BIC/0COSTCENTER length is 9. and the entry in the table is /BIC/0COSTCENTER = 1000 only. How to get the lenth of value in the table.
Any help greatly appreciated. Thanks.
Best Regards,
Suresh.Below is example code
Data: var1(10) type c value '2500',
var2 type i.
var2 = Strlen( var1 ).
write var2.
<b>Reward Points for helpful answers</b>
Satish -
Possible to get length from midi files?
Is it possible to retrieve the length from a midi file, for example in miliseconds?
And how is that helping me?So my taking my limited free time to consider your question, do a search on google, and pull up a very appropriate article -- all as a volunteer mind you -- is not helpful?
A word of advice: you will have a much greater chance of getting more help if you show appreciation for anyone who takes the time out to consider your problem and offer any even remotely useful solution.
just my 2 Shekel's worth...
It explains how MIDI format is built...
I am no pro as you may understand, because I posted
in "New To Java".And I can magically read your mind and know exactly where you are in your java development? Sorry, I left my mind-reading cap at work. You were not exactly detailed in what you were seeking, what you know, and what you've found so far. Another word of advice: try to put as much effort into asking your question as you'd like someone would to answer it.
And I know you can get length of .wav files for
example by using Clip. That's why I am asking if
there's a way for midi files as well. Like a method
for AudioStream or whichever.I hope you find your method. But this is all the help you are going to get from me. Geeze... -
DRG-11112: length of CLOB query value exceeds maximum of 64000
Is there a CLOB length limitation when running an Oracle Text search? (v 11.1.0.7) I have checked the Reference Guide and Application Developer's Guide.
--create table
create table nk_1929(id number, vc_a clob);
--insert dummy data
declare
vc_clob clob;
begin
vc_clob := lpad(to_clob('a'), 222920, 'a');
insert into nk_1929 values(1, vc_clob);
end;
--create index
create index nk_1929_ndx on nk_1929(vc_a)
indextype is ctxsys.context parameters('
datastore ctxsys.default_datastore
stoplist ctxsys.empty_stoplist');
--run query with a search string longer than 64000
declare
str1 clob;
query_term clob;
begin
select vc_a into query_term from nk_1929 where id = 1;
str1 := 'select id from nk_1929 where contains(vc_a, :1) > 0';
execute immediate str1 using query_term;
end;
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-11112: length of CLOB Query Value exceeds maximum of 64000
Please let me know if I am missing something here?Same 64000 CLOB query value limitation is also generated with a simple select:
--run query with a search string longer than 64000
declare
vn_id number;
query_term clob;
begin
select vc_a into query_term from nk_1929 where id = 1;
select max(id) into vn_id from nk_1929 where contains(vc_a, query_term) > 0;
end;
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-11112: length of CLOB Query Value exceeds maximum of 64000 -
Revision: 13468
Revision: 13468
Author: [email protected]
Date: 2010-01-12 15:59:25 -0800 (Tue, 12 Jan 2010)
Log Message:
(commit on behalf of Hans): The following ASyncListView methods now ignore IPEs thrown when the operation is delegated: 'get length()', addItem(), addItemAt(), setItemAt().
QE notes:
Doc notes:
Bugs: sdk-24975
Reviewer: Alex
Tests run:
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/sdk-24975
Modified Paths:
flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/collections/AsyncListView.asDear Pallavi,
Very useful post!
I am looking for similar accelerators for
Software Inventory Accelerator
Hardware Inventory Accelerator
Interfaces Inventory
Customization Assessment Accelerator
Sizing Tool
Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
Request help on such accelerators... Any clues?
Any reply, help is highly appreciated.
Regards
Manish Madhav -
Chnage colum from CLOB to Varchar2 and find the length of CLOB
Hi,
I have got tables contain CLOB fields. I want to converter them to varchar2? Is the a way to do it? how can I find the max of length the data in CLOB fields.
Thanks in advance!!
MichaelHi All,
Thanks you for your useful information. What I need is to change the colum data type (definaition itself)from CLOB to Varchar2, not just to display the values in CLOB field into varchar2. I have tried to change the date type from COLB to varchar2 in TOAD and got ORA_22859: invaliad modification of columns.
Any suggestions?
Many Thanks
Michael -
How to get Length in pixel of a String in j2ee??
Hi guys, im having a problem trying to find out how to get pixels from a string length, but in j2ee, i've researched, but everyone said to use Graphics2D, but since im using j2ee, i dont know how to use this.
For example i found this piece of code, but this doesnt work for me:
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
Font font = new Font("Serif", Font.PLAIN, 12);
FontMetrics fontMetrics = g2d.getFontMetrics();
int width = fontMetrics.stringWidth("aString");
int height = fontMetrics.getHeight();
How to get g2d, if i dont have a graphics to send it to the method??
I would be really happy if anyone could send me a example using a javabean.
How to do this guys???? please help me with this guys,thanks.
yellrim working on a good explanation for this question, im trying to send pics of my programso you understand me pretty well. But a general idea, its im creating dynamically components, like labels, textFields, dropDowns, etc. My problem comes when im adding to form the labels, these labels are going to show the descripcion of the component, which it could be a textField, dropDown, textArea etc.
I put all these components on a gridPanel, for each row i can have severals componets,
I have a gridPanelGeneral which have all other gridPanels, this gridPanelGeneral have gridPanelRow+"numRow"
This gridPanelRow+"numRow" can have severals components which show like columns.
Sincerely i would like to put pictures of the program, so that way you will understand my problem, i need to set the label.setStyle(width:"+numPixelesOfDescriptionOfComponent+"px). To put these labels well, because the user cant see very well the description of the component when i have severals components, each component does have a label for its description. descriptionOfComponent is a string thats why i need to get the pixels of the string.
One question, how do i do put pics on this forum??
Edited by: yellr on Oct 30, 2007 9:56 AM -
Replacement of WS_QUERY to get length of filename
Hi,
We are using WS_QUERY FM to get the length of file name.
CALL FUNCTION 'WS_QUERY'
EXPORTING
filename = l_filename
query = 'FL'
IMPORTING
return = return
This FM is obslete in ECC 6.0. So is there any FM or method which provides the same functionality.
Regards
MandeepGUI_GET_DESKTOP_INFO
or
You can make use of the method "FILE_EXIST" or "DIRECTORY_EXIST" or "GET_PLATFORM" of the class "CL_GUI_FRONTEND_SERVICES" -
SQL loader Field in data file exceeds maximum length for CLOB column
Hi all
I'm loading data from text file separated by TAB and i got the error below for some lines.
Event the column is CLOB data type is there a limitation of the size of a CLOB data type.
The error is:
Record 74: Rejected - Error on table _TEMP, column DEST.
Field in data file exceeds maximum length
I'm using SQL Loader and the database is oracle 11g r2 on linux Red hat 5
Here are the line causing the error fronm my data file and my table description for test:
create table TEMP
CODE VARCHAR2(100),
DESC VARCHAR2(500),
RATE FLOAT,
INCREASE VARCHAR2(20),
COUNTRY VARCHAR2(500),
DEST CLOB,
WEEK VARCHAR2(10),
IS_SAT VARCHAR2(50),
IS_SUN VARCHAR2(50)
CONTROL FILE:
LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
CODE,
DESC,
RATE,
INCREASE,
COUNTRY),
DEST,
WEEK,
IS_SAT,
IS_SUN
Data file:
BHS Mobile Bahamas - Mobile 0.1430 1 "242357, 242359, 242375, 242376, 242395, 242421, 242422, 242423, 242424, 242425, 242426, 242427, 242428, 242429, 242431, 242432, 242433, 242434, 242435, 242436, 242437, 242438, 242439, 242441, 242442, 242443, 242445, 242446, 242447, 242448, 242449, 242451, 242452, 242453, 242454, 242455, 242456, 242457, 242458, 242462, 242463, 242464, 242465, 242466, 242467, 242468, 24247, 242524, 242525, 242533, 242535, 242544, 242551, 242552, 242553, 242554, 242556, 242557, 242558, 242559, 242565, 242577, 242636, 242646, 242727"
BOL Mobile ENTEL Bolivia - Mobile Entel 0.0865 Increase 591 "67, 68, 71, 72, 73, 740, 7410, 7411, 7412, 7413, 7414, 7415, 7420, 7421, 7422, 7423, 7424, 7425, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7440, 7441, 7442, 7443, 7444, 7445, 7450, 7451, 7452, 7453, 7454, 7455, 746, 7470, 7471, 7472, 7475, 7476, 7477, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7490, 7491, 7492, 7493, 7494, 7495, 7496" Thank you.Hi
Thank you for youe help, I found the solution and here what i do in my Control file i added
char(40000) OPTIONALLY ENCLOSED BY '"' .
LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
CODE,
DESC,
RATE,
INCREASE,
COUNTRY,
DEST
char(40000) OPTIONALLY ENCLOSED BY '"',
WEEK,
IS_SAT,
IS_SUN
Thank you for your help. -
Hi,
I have a table with one of the column as CLOB,My requirement is as below.
1)Get distinct data to eliminate the duplicate records from the load (Which includes CLOB column too)
2)Need to compare the old data in the table with incoming source data .
Both these cases I need to deal with CLOB objects which made my life difficult.
Can some one suggest an appropriate solution,as ,how to handle the scenario as well CLOB objects in these kind of scenarioes.
Thanks in advance,
Rajesh.Hi,
Is this what you require??
SQL> create table testclob
2 (id number,
3 data clob);
Table created.
SQL> insert into testclob values(1,'Oracle SQL tecnology');
1 row created.
SQL> insert into testclob values(2,'Oracle PL/SQL tecnology');
1 row created.
SQL> insert into testclob values(3,'Oracle SQL tecnology');
1 row created.
SQL> insert into testclob values(4,'Oracle SQL tecnology');
1 row created.
SQL> insert into testclob values(5,'Oracle PL/SQL tecnology');
1 row created.
SQL> insert into testclob values(6,'JAVA tecnology');
1 row created.
SQL> insert into testclob values(7,'SIEBEL tecnology');
1 row created.
SQL> insert into testclob values(8,'Oracle Forms tecnology');
1 row created.
SQL> commit;
Commit complete.
SQL> set lines 900
SQL> select * from testclob;
ID DATA
1 Oracle SQL tecnology
2 Oracle PL/SQL tecnology
3 Oracle SQL tecnology
4 Oracle SQL tecnology
5 Oracle PL/SQL tecnology
6 JAVA tecnology
7 SIEBEL tecnology
8 Oracle Forms tecnology
8 rows selected.
SQL> select distinct data from testclob;
select distinct data from testclob
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got CLOB
SQL> select distinct to_char(data) from testclob;
TO_CHAR(DATA)
Oracle SQL tecnology
Oracle PL/SQL tecnology
SIEBEL tecnology
JAVA tecnology
Oracle Forms tecnologyTwinkle -
I have an element called <Transaction>. This element has child elements within it. How can I get a length or count of how many child elements are within the <Transaction> element using PL/SQL?
Thanks
Jenniferpresume l_node_listg is a xmldom.DOMNodeList
and p_node is the xmldom.DOMNode of which you
want the amount of children
l_node_list := xmldom.getChildNodes(p_node);
amount := xmldom.getLength(l_node_list);
amount represents the number of children...
mind that #text and #comment children are not seen/accepted as REAL childs !! so only NODES will be taken in account !
hope this will help....
bye
null -
Get length and width of a rectangle
I am using sdo_sam.tiiled_bins to breakup rectangles into different sections. I need to divide the rectangle along the x or y axis depending on if is longer or wider. I checked the documentation and I could not find a way to get the length and width of a minimum bounding rectangle. Is there any built in functionality to get the length and width of a rectangle or do i have to create my own? Database is 11gr2.
Thanks
RobRob,
You can use SDO_GEOM.SDO_MIN_MBR_ORDINATE and SDO_GEOM.SDO_MAX_MBR_ORDINATE to compute the length and width of an mbr.
References:
[ SDO_GEOM.SDO_MIN_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866250 ]
[ SDO_GEOM.SDO_MAX_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866249 ]
Regards,
Noel -
Currently we have a web application that stores all of it's associated data in an XML document. This XML document is then stored in a CLOB field in an Oracle 10g database. I would like to use XML Publisher to query the XML document that is stored in the CLOB field. I have installed XML Publisher and cannot find a way get an XML feed from a CLOB field on a database. Please advise if this is possible and if so, some pointers as to how this can be accomplished. Thank you.
Apologies, I thought I had written this up for the blog ... evidently not:
select WAREHOUSES.WAREHOUSE_ID as WAREHOUSE_ID,
substr(WAREHOUSES.WAREHOUSE_SPEC.getClobval(),22) as WAREHOUSE_SPEC,
WAREHOUSES.WAREHOUSE_NAME as WAREHOUSE_NAME
from OE.WAREHOUSES WAREHOUSES
Where WAREHOUSE_SPEC contains :
<?xml version="1.0" ?>
<Warehouse>
<Building>Owned</Building>
<Area>25000</Area>
<Docks>2</Docks>
<DockType>Rear load</DockType>
<WaterAccess>Y</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Street</Parking>
<VClearance>10 ft</VClearance>
</Warehouse>
I needed the substr to strip the header out, not elegant but it works just fine.
Tim
Maybe you are looking for
-
IBook and external HDD - Advice needed
Hi all, I am using an old G3 white dual USB iBook with OS X 10.2.8. The backlight cable broke a year ago, and I finally worked up the nerve to replace it myself...and while I'm in there, I'd like to drop in a new 120GB Seagate hard drive to replace t
-
How to have Acrobat X skip deleted pages in its counting as if they are still there?
WHat I mean is this, You have pages, the actual paper so to speak, numbered 1,2,3,4,5,6.......45. You could see each number on the bottom of the page. As is you have on the top left corner which pge you're on based on the toal pages, for ex. 7 / 49 I
-
Hi- I bought an 8G iPod model MA623ZD since 2008 and i did not operate it since then. Now that my children grow up they discover it and i have to find out how to get started! Though i have the following qns: 1)When i tried to get the most updated iOS
-
I have read recommendations about not emptying the trash before your iMovie HD6 project is finished (otherwise there are problems editing photos that have Ken Burns effect applied). If I do not empty the iMovie Trash, can I empty the OS X Trash witho
-
How do I show what menu title is active, e.g. current page, in spry navigation? See website http://dorsay-easton-indian-law.com/index.html I want to have Home menu title have a different color when on index.html and so on. I keep using the term "acti