Dba_views and column text (long type)

Hi,
when i excute this select :
select view_name||' '||
owner||' '||
to_char(text_length)||' '||
dbms_lob.substr(text_clob(view_name),text_length,1)
from sys.dba_views@my_link;
-- text_clob is a function wich convert long to clob
I have this error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
any suggestion.

What is your Oracle version.
I have an Oracle 9iR2 database, and your function and query work very well.
SQL> create or replace function text_clob (p_view_name in varchar2) return clob
2 l_text_long long;
3 Result clob;
4 begin
5 SELECT text
6 INTO l_text_long
7 FROM dba_views
8 WHERE VIEW_NAME = UPPER( p_view_name ) ;
9 Result := l_text_long ;
10 return(Result);
11 end;
12 /
Function created.
SQL> select view_name||' '||
2 owner||' '||
3 to_char(text_length)||' '||
4 dbms_lob.substr(text_clob(view_name),text_length,1)
5 from sys.dba_views;
VIEW_NAME||''||OWNER||''||TO_CHAR(TEXT_LENGTH)||''||DBMS_LOB.SUBSTR(TEXT_CLOB(VI
ALL_ALL_TABLES SYS 1411 select OWNER, TABLE_NAME, TABLESPACE_NAME, CLUSTER_NAME,
IOT_NAME,
PCT_FREE, PCT_USED,
INI_TRANS, MAX_TRANS,
INITIAL_EXTENT, NEXT_EXTENT,
MIN_EXTENTS, MAX_EXTENTS, PCT_INCREASE,
FREELISTS, FREELIST_GROUPS, LOGGING,
BACKED_UP, NUM_ROWS, BLOCKS, EMPTY_BLOCKS,
AVG_SPACE, CHAIN_CNT, AVG_ROW_LEN,
AVG_SPACE_FREELIST_BLOCKS, NUM_FREELIST_BLOCKS,
DEGREE, INSTANCES, CACHE, TABLE_LOCK,
There is perhaps any problem through db_link, have you test in local ?
My option to create an other table work well too. You can try it.
Nicolas.

Similar Messages

  • PLEASE HELP!!!  Problem with Java and SQLServer Text data type

    Hi there,
    I have a java app. that reads from an MS SQLServer database. Originally, all long text fields were declared as NVARCHAR(200). The program worked fine.
    Someone then advised that I change all long text fields to the TEXT data type. The program now crashes out with the following Exception:
    "java.sql.SQLException: [JRun][SQLServer JDBC Driver]This ResultSet can not re-read row data for column 25."
    Basically, I have a method that retrieves a resulset and iterates through it. The resultset is passed to another method during each iteration. In the example below, the 'specialNote' field used to be NVARCHAR(200). The code worked fine. Then when it was changed to TEXT, the program no longer works with the above Exception thrown.
    Anyone know any special way SQLServer TEXT data types need to be handled?
    Thanks for any advice!
    The code looks something like this in functionality:
    <CODE>
    public void method1 (Connection conn)
    Resultset rs = conn.createStatement().executeQuery("SELECT * FROM ProductBB");
    while (rs.next())
    method2(rs);
    public void method2 (ResultSet rs)
    String str = rs.getString("specialNote");
    </CODE>

    Hi JWoods,
    Thanks for the suggestion. I originally had the code do what you suggested, ie, get the resultset then retrieve the data all within the same method. The data is then used to set properties in an object.
    When I had to create another method that also retrieved a resultset but using a different primary key, then also use the returned data to set the properties in the same type of object, I didn't want to repeat the setter code. That's why I decided to pass the resultsets to the same method that did the property setting.
    Unfortunately, it stopped working with the data type change.
    Any other thoughts?

  • Specified url text input type of form in DW CS5

    If I wanted to dilspay a text input type form on the site's last page, Will the url link function during my table data display? I'm assuming it will be hoverable and active as a link if the text input type form used to submit the link to the database is set up properly? The text input type form creates a record that is automatically saved on a database that I can then use to check for display errors. What other type of url links work with text input type forms in DW.

    If I wanted to dilspay a text input type form on the site's last page, Will the url link function during my table data display?
    I don't understand what you are asking.  Can you say more about this url link function, and the text input type form?

  • Urgent, long type...

    Hi!
    I have a report with a field that must include the content of a column of Long type,
    the field in the report must not go out of 5 pages....
    how will I manage thie in the report ??
    thanks, it's urgent!!!

    You are getting an error at line 5:
    5 arq := utl_file.fopen('p:\temp\','test.sql','w');It has nothing to do with your long column, but utl_file cannot open the file. Put an exception handler in your program to see the error:
    EXCEPTION
           WHEN UTL_FILE.INVALID_PATH THEN
             RAISE_APPLICATION_ERROR(-20100,'Invalid Path');
           WHEN UTL_FILE.INVALID_MODE THEN
             RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');
           WHEN UTL_FILE.INVALID_OPERATION then
             RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');
           WHEN UTL_FILE.INVALID_FILEHANDLE then
             RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');
           WHEN UTL_FILE.WRITE_ERROR then
             RAISE_APPLICATION_ERROR(-20104,'Write Error');
           WHEN UTL_FILE.READ_ERROR then
             RAISE_APPLICATION_ERROR(-20105,'Read Error');
           WHEN UTL_FILE.INTERNAL_ERROR then
             RAISE_APPLICATION_ERROR(-20106,'Internal Error');
           WHEN OTHERS THEN
             UTL_FILE.FCLOSE(fHandle);

  • ID CS3 - text wrap doesn't work at the end of a long multi-columned text frame

    Did a search - don't think this specific issue has been addressed:
    We design large graphics often used on walls. When working with a text frame that that was 11 feet long and had 8 columns, text wrap would not work on an image placed in the last column. The same image with the same text wrap applied will work fine anywhere else in the text frame. I found that if I shortened the width of the text frame a little bit at a time eventually it would work, but there doesn't seem to be a specific cut-off width - sometimes the last column won't text wrap when the frame is 115 inches wide and sometimes it doesn't work when the frame is only 80 inches wide. Again, all of the other columns work fine. I have tried all of the obvious stuff, the only variable between the columns that wrap and the one that doesn't is it's position at the end of the text frame.
    We have gotten around this issue by using multiple threaded frames instead of one long frame with multiple columns, but I am curious if anyone else has run into this or might know what the issue is.
    thanks

    Did a search - don't think this specific issue has been addressed:
    We design large graphics often used on walls. When working with a text frame that that was 11 feet long and had 8 columns, text wrap would not work on an image placed in the last column. The same image with the same text wrap applied will work fine anywhere else in the text frame. I found that if I shortened the width of the text frame a little bit at a time eventually it would work, but there doesn't seem to be a specific cut-off width - sometimes the last column won't text wrap when the frame is 115 inches wide and sometimes it doesn't work when the frame is only 80 inches wide. Again, all of the other columns work fine. I have tried all of the obvious stuff, the only variable between the columns that wrap and the one that doesn't is it's position at the end of the text frame.
    We have gotten around this issue by using multiple threaded frames instead of one long frame with multiple columns, but I am curious if anyone else has run into this or might know what the issue is.
    thanks

  • I updated to Firefox 4.0.1 and can no longer use the thumb/finger spreading feature on the trackpad of my Mac Powerbook (Mac OSX 10.6.7) to enlarge text on websites. How do I restore this function?

    I updated to Firefox 4.0.1 and can no longer use the thumb/finger spreading feature on the trackpad of my Mac Powerbook (Mac OSX 10.6.7) to enlarge text on websites. How do I restore this function?

    * [/questions/777886]
    Some gestures have been removed in Firefox 4.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.latched -> <b>false</b>
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    You can use the Filter bar at to top of the about:config page to locate a pref more easily.

  • Need to convert long type column to varchar2 type

    I got a problem in creating a staging table.. i have to pull out data from database to create data file.. But a column is of type long and has got enter character (chr 10) values in between.. Because of that character i cant able load data to staging table.. some error shows second end character needs.. so that data was not properly into table..
    for ex:
    08/21/07 14:46:02 MMURPHY
    per client mail date is 10/1/07
    this data has got enter character (chr 10) after MMURPHY while loading this data to staging.. i got error..
    so pls suggest me some solution to create sql loader file using pl/sql procedures..
    so that i convert that (chr10) value to some other value..

    Try to put this column into function which will be searching for chr(10), and replace it. Create control file like:
    colname type "REGEXP_REPLACE(:colname, ...)"

  • Substr and instr for long column

    Plesae need support ,how can use instr and substr function for column with long datatype
    select substr(rec,1,(instr(rec,'?',1))) from F_DE_O_HISTORY_QUEUE_PRE_TST2
    rec column is long,When execute this select message displayed as ORA-00932: inconsistent datatypes: expected NUMBER got LONG

    Try to create a global temporary table and work on this table using DBMS_LOB.INSTR and DBMS_LOB.SUBSTR:
    SQL> desc t;
    Name                                      Null?    Type
    X                                                  NUMBER(38)
    Y                                                  LONG
    SQL> create global temporary table tmp on commit preserve rows as select x, to_lob(y) as y from t ;
    Table created.
    SQL> desc tmp;
    Name                                      Null?    Type
    X                                                  NUMBER(38)
    Y                                                  CLOBEdited by: P. Forstmann on 19 janv. 2010 12:42

  • Importing an SQL Server TEXT data type field in Oracle - problem with LONG

    Hello,
    I work in Oracle 9i and I created a view on a distant SQL Server database that contains a TEXT data type field. But I have a problem when I select that field in Oracle; I have the following error message: "ORA-00997: forbidden use of LONG data type".
    Could anybody have a solution for me, to solve that problem?
    Thanks a lot!

    It is very difficult to suggest anything without seeing your code.  I don't even know if what you are seeing is the actual value or an error code.  Often, negative numbers are indicative of error codes. 
    For instance -1 could mean that you have an invalid reference or path, etc...
    Can you post your code?

  • PO RTF Template: Multiple attachments(long and shor text) displayed once

    Hi
    I have a RTF template for PO output communication program. These are the issues i am facing. could someone help.
    1) The template does not display multiple short text elements for each line number. It only displays the first attachment.
    <LINE_SHORT_TEXT>
    <LINE_SHORT_TEXT_ROW>
    <PO_LINE_ID>54015</PO_LINE_ID>
    <SHORT_TEXT>short text 1</SHORT_TEXT>
    </LINE_SHORT_TEXT_ROW>
    <LINE_SHORT_TEXT_ROW>
    <PO_LINE_ID>54015</PO_LINE_ID>
    <SHORT_TEXT>short text 2</SHORT_TEXT>
    </LINE_SHORT_TEXT_ROW>
    </LINE_SHORT_TEXT>
    In the template this
    <?for-each:LINES_ROW?><?sort:LINE_NUM;'ascending';data-type='number'?>
    <?LINE_NUM?> <?SHORT_TEXT?>
    <?end for-each?>
    2) The template does not display the multiple attachments(long text) for each line number. It only displays the first attachment.
    </DISTRIBUTIONS_ROW>
    </DISTRIBUTIONS>
    </LINE_LOCATIONS_ROW>
    </LINE_LOCATIONS>
    </LINES_ROW>
    </LINES>
    <LINE_ATTACHMENTS>
    <TEXT>long text attachment which is 2nd note.</TEXT>
    <ID>53995</ID>
    <TEXT>see this 5th long atta</TEXT>
    <ID>53995</ID>
    <TEXT>long text 1</TEXT>
    <ID>54015</ID>
    <TEXT>long text 2</TEXT>
    <ID>54015</ID>
    </LINE_ATTACHMENTS>
    In the template i am doing this
    <?if: PO_DATA/LINE_ATTACHMENTS/TEXT !=''?>
    <?for-each:LINES_ROW?><?sort:LINE_NUM;'ascending';data-type='number'?>
    <?if:LINE_NUM!=''?> <?concat('Line Number ',LINE_NUM)?> <?end if?>
    <?variable@incontext:PoLnID;'PO_LINE_ID'?>
    <?/PO_DATA/LINE_ATTACHMENTS/ID[child::text()=$PoLnID]/preceding-sibling::TEXT[1]?>
    <?end for-each?>
    3) Also I want the Total amount to be printed on the last page but the total amount header should still be there on every page and has "Continued" text when it has multiple pages.
    4) Also the Text File attached to PO is not seen in the PDF PO. is there anything for it do ?
    Please help
    Thanks
    Edited by: user525275 on May 1, 2009 2:14 PM

    Hi Tim,
    You are quite right... I'm trying to associate each of the text attachments with the proceeding ID.
    I've simplified it (sorry, I hadn't turned on the monitoring of the forums) in the following forum post:
    Basic RTF template question
    BTW, thanks for your blog. It's been very helpful.
    Cheers,
    Andrew

  • I can no longer type after typing a URL and autocomplete not finding a matching URL. How to fix that?

    After I open Firefox I start typing the URL. After each letter I see autocomplete suggestions. Imagine I type "g", then "o" (google is shown as autocomplete), but then I enter "a". Since I have no pages that begin with "goa", autocomplete is hidden and the problem is, I can no longer type anything. All my key strokes are now ignored (backspace, enter... it dosen't matter). But I still see the cursor blinking after "goa".
    I have discovered that Firefox must be focused on some other interface element (not in the address bar), because if I press the TAB key, the focus is again shifted to the address bar and I can continue typing. Sometimes I have to press TAB 2 or 3 times while entering an address to be able to write what I want. It looks like every time autocomplete is closed, the program focus leaves the address bar.
    I've been having this problem for at least 4 or 5 versions of Firefox and it does not happen on every Firefox session. It can be solved by closing Firefox and opening it again. Pressing the TAB key has become kind of a reflex, so it's just annoying and I can work around it.
    But why is this happening?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I would also recommend to write the description into the meta data. This would allow to place a text frame above the image and it is possible to add meta information and file name automatically together with the image, when you place it or even in a prepared template.
    Meta data information can be written easily in Bridge in the Meta File Workspace.

  • I used to be able to increase the size font of the persons name sending me an email or text message.  I have an iphone 5 and can no longer do that.  Help!

    I used to be able to increase the size font of the persons name sending me an email or text message.  I have an iphone 5 and can no longer do that.  Help!

    Just the name? Don't ever recall that being a feature. However, for Mail and Messages (and a few other apps): Settings app > General > Text Size

  • How would I be able to pull up all of the text messages tat were in my phone over the course of 2 years and back them up to my computer since my phone has a broken screen and can no longer read the mesages.

    How would I be able to pull up all of the text messages tat were in my phone over the course of 2 years and back them up to my computer since my phone has a broken screen and can no longer read the mesages.

    If the messages are stored on the device and you can power the device up you can use the application posted at https://community.verizonwireless.com/thread/770529  , the application has a screen capture option and you can use the screen as a guide to install MyBackup from Market or a number of backup apps from Market and then you can run the applications and backup data to your SD Card to restore to the replacement device.

  • I recently did the update and my text message notification was no longer working. Then I did a reset and now my locking function no longer works. What is going on???

    I recently did the update and my text message notification was no longer working. Then I did a reset and now my locking function no longer works. What is going on???

    What "locking function" are you talking about?

Maybe you are looking for

  • HP OFFICEJET 6700 w/windows 8.1 OFFLINE OFFLINE OFFLINE !

    Help Constantly losing ability to print. Uninstalled and Reinstalled printer. Made sure not set to "offline" and it IS set as the default printer. Am using a wireless connection. Printer is new. Used installation disc for the driver...is there a bett

  • Arabic support under MAC OS X 10.4; 10.5

    hello, i have an application written in flex, using standart textfield for inputs. i tested it under windows - it work all fine, but under max os x 10.4 under safari 1.3 and firefox 3.0 i cant write arabic characters. in other forms in browser arabic

  • Printing from lightroom leaves lines on image

    Hi All, I'm using a late 2009 iMac running Lightroom 5.5 and printing to a canon MG7150 photo printer.  When i try to print photographs (I'm using Ilford photo paper but the same result happens with normal paper) i get lines across the printed page. 

  • Software upgrades on HA Pairs?

    I am working on a plan to convert some of my existing 5508s to be HA pairs.  I like the redundancy i have now with multiple controllers, but don't necessarily like buying two licenses for every AP.  I am trying to determine the downside to the HA mod

  • Where can I see the output of System.out.println for iWS 4.1 on NT