procedure for data types long Analyzer

Plesae need help to create the procedure for paser then insert in a source table have columns with long data types
example of source table

Varchar2 item ID (250)
2001008
REC (LONG)
D20060119000175538000.2? D20060119000175541300.2? D20060119000175569900.2? D20060119000183679900.2?

by traget_table
ItemId
2001008
value
D20060119000175538000.2
D20060119000175541300.2
D20060119000175569900.2
D20060119000183679900.2

Hello

Your question reminds me of this parser for clob procedure.
However, the LONG are a tad more "Wicked".
Another way, assuming you want to convert, and then divide your LONG data in a VARCHAR2 column, is to 'Park' your LONG temporarily in a CLOB column:

SQL> create table source_tab (itemid number, long_value long);

Table created.

SQL> create table target_tab (itemid number, clob_value clob, varchar2_value varchar2(255));

Table created.

SQL> insert into source_tab
  2  select  1 , 'D20060119000175538000.2*?*D20060119000175541300.2*?*D20060119000175569900.2*?*D20060119000183679900
  3  select  2 , 'E20060119000175538000.2*?*E20060119000175541300.2*?*E20060119000175569900.2*?*E20060119000183679900
  4  select  3 , 'F20060119000175538000.2*?*F20060119000175541300.2*?*F20060119000175569900.2*?*F20060119000183679900

3 rows created.

SQL> select * from source_tab;

    ITEMID LONG_VALUE
---------- --------------------------------------------------------------------------------
         1 D20060119000175538000.2*?*D20060119000175541300.2*?*D20060119000175569900.2*?*D2
         2 E20060119000175538000.2*?*E20060119000175541300.2*?*E20060119000175569900.2*?*E2
         3 F20060119000175538000.2*?*F20060119000175541300.2*?*F20060119000175569900.2*?*F2

3 rows selected.

SQL> select * from target_tab;

no rows selected

SQL> insert into target_tab(itemid, clob_value)
  2  select itemid
  3  ,      to_lob(long_value)
  4  from   source_tab;

3 rows created.

SQL> select * from target_tab;

    ITEMID CLOB_VALUE                                                                       VARCHAR2_VALUE
---------- -------------------------------------------------------------------------------- -------------------------
         1 D20060119000175538000.2*?*D20060119000175541300.2*?*D20060119000175569900.2*?*D2
         2 E20060119000175538000.2*?*E20060119000175541300.2*?*E20060119000175569900.2*?*E2
         3 F20060119000175538000.2*?*F20060119000175541300.2*?*F20060119000175569900.2*?*F2

3 rows selected.

SQL> insert into target_tab(itemid, varchar2_value)
  2  select itemid
  3  ,      extractvalue (column_value, 'e')
  4  from   target_tab
  5  ,      table (xmlsequence (xmltype ('' || replace (clob_value, '*?*', '') || '').extract ('

12 rows created.

SQL> select * from target_tab;

    ITEMID CLOB_VALUE                                                                       VARCHAR2_VALUE
---------- -------------------------------------------------------------------------------- -------------------------
         1 D20060119000175538000.2*?*D20060119000175541300.2*?*D20060119000175569900.2*?*D2
         2 E20060119000175538000.2*?*E20060119000175541300.2*?*E20060119000175569900.2*?*E2
         3 F20060119000175538000.2*?*F20060119000175541300.2*?*F20060119000175569900.2*?*F2
         1                                                                                  D20060119000175538000.2
         1                                                                                  D20060119000175541300.2
         1                                                                                  D20060119000175569900.2
         1                                                                                  D20060119000183679900.2
         2                                                                                  E20060119000175538000.2
         2                                                                                  E20060119000175541300.2
         2                                                                                  E20060119000175569900.2
         2                                                                                  E20060119000183679900.2
         3                                                                                  F20060119000175538000.2
         3                                                                                  F20060119000175541300.2
         3                                                                                  F20060119000175569900.2
         3                                                                                  F20060119000183679900.2

15 rows selected.

SQL> delete from target_tab where varchar2_value is null;

3 rows deleted.

SQL> alter table target_tab drop column clob_value;

Table altered.

SQL> select * from target_tab;

    ITEMID VARCHAR2_VALUE
---------- ----------------------------------------------------------------------------------------------------------
         1 D20060119000175538000.2
         1 D20060119000175541300.2
         1 D20060119000175569900.2
         1 D20060119000183679900.2
         2 E20060119000175538000.2
         2 E20060119000175541300.2
         2 E20060119000175569900.2
         2 E20060119000183679900.2
         3 F20060119000175538000.2
         3 F20060119000175541300.2
         3 F20060119000175569900.2
         3 F20060119000183679900.2

12 rows selected.

SQL> 

I also took your delimiter is ' *? *', so you may need to change this.

See the documentation for the function TO_LOB: http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions203.htm#SQLRF06134

Tags: Database

Similar Questions

  • [nQSError: 43119]:-the data type: 25 is not supported columns error for data type "uniqueidentifier".

    Hi all


    I am facing a problem while creating a BI reports to the SQL Server 2008 Database.

    Access to columns of data type "uniqueidentifier" I get error [nQSError: 43119]:-the data type: 25 is not supported.

    • OBIEE 11.1.1.6.11 on Linux x86_64 servers is hosted by the Services of Oracle Cloud.
    • Using last "ODBC driver for SQL server 11" for connection (also tried driver "DataDirect SQL Server 6.0 native Wire Protocol").
    • No "Uniqueidentifier" data type columns display correctly in reports.
    • I tried to change the columns of data type "Uniqueidentifier" to char (36), VARCHAR (36), VARCHAR (40), types of binary data (16) in the physical layer on various suggestions but error still there.

    Same columns questioned the SQL Developer (using third-party jTDS JDBC driver "jtds - 1.2.7 - dist") I am able to see these "uniqueidentifier" data columns. record sample:-"CB350576-FCD8-DE11-B111-002219598619".


    Please advice if this is a bug or I'm missing some property of SQL server database settings.


    Thanks in advance.

    Yes Srini,

    This type of column becomes UNKNOWN when they are imported into SPR but its strange after changing to VARCHAR (36), we can use it for joining tables without any problem.

    Only issue I'm facing now is the limitation to use in queries like calculate the total number of incidents (in my case incidentid is the primary key).

    But I've found a workaround. I am formulating a measure in MDB layer to get the number of total incidents as {CASE WHEN is NULL then 0 otherwise 1 END}.  the aggregation is defined on the sum and I get incident count works correctly.

    Thanks for your help.

  • Procedure for starting and long stop on the Satellite P200 - 10 c

    I have a Satellite P200 - 10 c and I bought this laptop with pre-installed Vista Home Premium.
    Everything works fine, but it takes a long time for the computer to boot. Same thing with shut down and restart.
    Is this normal?

    * amaster *, it has nothing to do with the laptop - that's Vista. You would be to optimize your system.
    1. disable UAC (run msconfig on Tools choose disable UAP, where getting the message "Command completed successfully" - restart)
    2. turn off some visual effects: go to control panel / system / advanced system settings / Advanced tab / Performance settings / Visual effects (default tab) and disable the following list:
    Animate controls and elements inside windows
    Menu fade or slide into view
    ToolTip fade or slide into view
    Fading of items after clicking
    Show shadows under menus
    Show shadows under mouse pointer
    Show translucent selection rectangle
    Drag the open drop-down list boxes
    Drag the task bar buttons
    3. optimize virtual memory: first remove the existing file - control panel/system/advanced system settings/advanced/performance-settings/advanced/Virtual Memory-change... mark "No. Paging File." Reset. Then create the new paging file - Control Panel/System/advanced system settings/advanced/performance-settings/advanced/Virtual Memory-change... do fixed Page File with size equal to: amount of physical memory (RAM) + 1 GB. If you have two hard drives - best create the pagefile on no system disk. The min and max sizes of pagefile should be equal - not different.
    4 turn off System Restore. (Start / computer/properties/Advanced Settings/System Protection.) If UAC will ask you confirmation - allow)
    5. turn off the Hibernation (start programs/guest/in the context menu, choose "Run as Administrator" and in the command line write * powercfg OFF h *)
    6. cut unused services (do not turn it off completely - do, then manually run)
    7 edit the registry:
    [HKEY_CURRENT_USER\Control Panel\Desktop]
    MenuShowDelay = 0 (default 400)
    AutoEndTasks = 1
    HungAppTimeout = 1000
    WaitToKillAppTimeout = 1000
    LowLevelHooksTimeout = 1000

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control]
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control]
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro L]
    In all three destinations: WaitToKillServiceTimeout and make 5000 (default 20000)

    [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\PriorityControl]
    Win32PrioritySeparation = 6 (default value 2)

    And so on and so forth... Actually-, it is a never-ending story...

  • How to display the data type long using the select statement

    Hai All

    I have to select the text of a view. But the text is declared as long and I need to see full view

    When I use this

    Select the text in all_views where view_name = "DAILY_ATTEND_VIEW";

    I have got only half of a select statement

    Concerning

    Srikkanth.M

    Hello

    SQL> SET LONG 100000
    SQL> select text from user_views
      2   where view_name='MVIEW';
    
    TEXT
    ------------------------------------------
    select e.empno,e.deptno,d.dname
    from emp@sdblink e,dept@sdblink d
    where e.deptno=d.deptno
    

    But it is limited to sql alone. If you use the double click TOAD on the text column in the grid will show you the entire SQL views.
    Unfortunately, there is limitation to consider,
    The largest value that you return from the function would be 32 k (RETURN VARCHAR2), both.

    Twinkle

  • To display long the field data type

    Hello

    can any1 help me showing the column with the data type long. The version of oracle's 10g.


    concerning
    Chaitanya
    Set the maximum width (in chars) for displaying and copying LONG values.
    
  • Long data type in 10g

    Hi all

    We are abt to put one of our prod 9.2.0.6 in 10.2.0.4 database in solaris and when I checked in the base of a few paintings of long data type is still it is it necessary to convert of LOB or I can ignore it.

    DATA_TYPE TABLE_NAME OWNER
    --------------- ------------------------------ -------------------- -----------
    OUTLN OL$ LONG
    WLI_SCHEMA WLI_B2B_BUSINESS_PROTOCOL_DEFN LONG
    WLI_SCHEMA WLI_B2B_LOGIC_PLUGIN LONG
    WLI_SCHEMA WLI_TPM_EXTENDED_PROPERTY_SET LONG
    WLI_SCHEMA WLI_TPM_SERVICE LONG
    WLI_SCHEMA WLI_TPM_TRADING_PARTNER LONG


    KK

    If Oracle is recommended for several years do not use the data type LONG on the user objects, there is still little for dictionaries of Oracle tables.
    However, you should not touch.
    With respect to users within LONG data type, it is yours and tests the results depending on whether you can switch the type of LOB data or not and probably submit to be approved and taken in charge by the provider of your application.

    Nicolas.

  • Impact on performance when you use the LONG data type

    Hi all


    Only I have a doubt about the use of LONG data type

    I use the data type LONG for some columns in a table and I created indexes on the columns separately, but these column values can be easily fit into the varchar data type.

    (Just to see the performance on this issue)

    Suppose that a common select query with WHERE condition on any of the column which has LONG data type will affect the performance of the query?

    Please explain.

    Thank you

    (1) the LONG (and LONG RAW) data types have been depricated for quite a while. Oracle has been strongly recommends that you move to 8.1.5 CLOB and BLOB data types. Why you use the LONG data type? You're still on Oracle 7?

    (2) have you tried to write a query that has a WHERE condition that refers to a LONG column? In general, you can not because it does not support the type of data LONG. For example

    SQL> ed
    Wrote file afiedt.buf
    
      1  create table a (
      2    col1 varchar2(30),
      3    col2 long
      4* )
    SQL> /
    
    Table created.
    
    SQL> select * from a where col2='abc';
    select * from a where col2='abc'
                          *
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    

    LONG data types are a royal pain to work with. They also have implications on the performance of wicked on the client.

    Justin

  • In CloverETL how to read file xlsx with a column of type "long".

    Hi all

    Let me know how to read an xlsx (Excel) file with columns of data type "long".

    I used XLSDataReader to read file xlsx. There are names of "Remarks" column, which exceeds the linits of 256 characters, so I can not use type 'string' to do this.

    IM using "long" datatype and graph below error crossings.

    Pointers on this will be greatly appreciated.

    INFO [main] - * graphic CloverETL framework/transformation, (c) 2002-2013 Javlin a.s., published under the GNU Lesser General Public License *.
    [Main] INFO - running with CloverETL library version 3.4.1 build #010 updated 07/01/2013 18:38:12
    INFO [main] - running on 4 CPUS, operating system Windows 7, architecture amd64, Java version 1.7.0_07, max memory available for JVM 913920 KB
    INFO [main] - loading properties by default: defaultProperties
    INFO [main] - graphic definition file: graph/SurveyResponses.grf
    INFO [main] - graphical revision: 1.16 modified by: 470707 update the: kill Jan 20 16:13:52 IST 2015
    INFO [main] - check the graphical configuration...
    INFO [main] - graphical configuration is valid.
    INFO [main] - graphical initialization (SurveyResponses)
    INFO [main] - initialization of the phase 0
    INFO [main] - Phase 0 initialized successfully.
    INFO [WatchDog_0] - starting all the nodes in the phase [0]
    INFO [WatchDog_0] - has successfully started all nodes in phase!
    INFO [XLSDATA_READER1_0] - reading data of 0 sheet (Sheet1).
    ERROR [WatchDog_0] - component [XLSDataReader:XLSDATA_READER1] finished with ERROR status.
    How (long) field cannot be set to the value "comment." does not match the specified format ' ' with good reason 'incomplete analysis. " in folder 1, 23 ("comment"), metadata field 'Survey_Responses_Sheet1 '; value: 'How' (note that for parallel processing ParallelReader or server, run the registration number may be incorrect)
    ERROR [WatchDog_0] - the error Details:
    org.jetel.exception.JetelRuntimeException: component [XLSDataReader:XLSDATA_READER1] finished with ERROR status.
    at org.jetel.graph.Node.createNodeException(Node.java:535)
    at org.jetel.graph.Node.run(Node.java:514)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.jetel.exception.BadDataFormatException: how (long) field cannot be set to the value "comment." does not match the specified format ' ' with good reason 'incomplete analysis. " in folder 1, 23 ("comment"), metadata field 'Survey_Responses_Sheet1 '; value: 'How' (note that for parallel processing ParallelReader or server, run the registration number may be incorrect)
    at org.jetel.data.LongDataField.fromString(LongDataField.java:465)
    at org.jetel.data.parser.XLSXDataParser.parseNext(XLSXDataParser.java:492)
    at org.jetel.data.parser.XLSParser.getNext(XLSParser.java:136)
    at org.jetel.util.MultiFileReader.getNext(MultiFileReader.java:432)
    at org.jetel.component.XLSReader.execute(XLSReader.java:562)
    at org.jetel.graph.Node.run(Node.java:485)
    ... 1 more
    Caused by: java.lang.NumberFormatException: incomplete analysis
    at javolution.text.TypeFormat.parseLongString (unknown Source)
    at javolution.text.TypeFormat.parseLong (unknown Source)
    at javolution.text.TypeFormat.parseLong (unknown Source)
    at javolution.text.TypeFormat.parseLong (unknown Source)
    at org.jetel.util.formatter.JavolutionNumericFormatter.parseLong(JavolutionNumericFormatter.java:74)
    at org.jetel.data.LongDataField.fromString(LongDataField.java:462)
    ... 6 more

    INFO [WatchDog_0] - the implementation of phase [0] completed with error - elapsed time (sec): 4
    ERROR [WatchDog_0] -! Completed with error - graphic stop run!
    INFO [WatchDog_0]-* the summary execution of Phases * -.
    INFO [WatchDog_0] - Phase # finished status RunTime (sec) MemoryAllocation (KB)
    INFO [WatchDog_0] - 0 4 175279 ERROR
    INFO [WatchDog_0]-* end of summary * -.
    INFO [WatchDog_0] - finished the watchdog thread - total running time: 4 (s)
    INFO [main] - freeing graphics resources.
    ERROR [main]-
    --------------------------------------------------------------------------------------------------------------------------------------------------------- Error details ----------------------------------------------------------------------------------------------------------------------------------------------------------
    Component [XLSDataReader:XLSDATA_READER1] finished with ERROR status.
    How (long) field cannot be set to the value "comment." does not match the specified format ' ' with good reason 'incomplete analysis. " in folder 1, 23 ("comment"), metadata field 'Survey_Responses_Sheet1 '; value: 'How' (note that for parallel processing ParallelReader or server, run the registration number may be incorrect)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ERROR [main] - the graph failed!

    I think the 256 character limit is a red herring.  All data is there, the front-end integrator is truncating only for display purposes.

    Your data is a string, it should certainly be classified as a string in the metadata.  For a long time is for numeric values.

    I don't think there is a problem here, if you were to write this data to the trash or a text file (after reading it in), you will see that your data is not truncated.

    Kind regards

    Patrick Rafferty

    Branchbird

  • Value of type long error

    I get the following error when the runing an interface.
    ORA-01461: can bind to a LONG value only for insert into a LONG column
    But there is no column with the data type long.
    What could be the error?

    Do you know what area or that is causing the problem? If this isn't the case, that is where I would start in this debugging. ODI attempts to insert a value of Oracle DB believes is a data type long - you'll need to understand what is the cause in order to repair.

  • Custom data type

    We use a custom data type container and add variables to use in the sequence inhabitants.

    It seems that the field of the local variable names having to match domain names that they have seized originally in the custom data type container.

    We want to reuse the custom several times in the sequence container for data type and would like to have descriptive field names of their use, which changes throughout the sequence.

    Is it possible to just rename the names of the fields of a local variable is of the type, data type container custom, while maintaining the field names the original custom data type container?

    With the help of TestStand 2013

    Thank you

    Hi CC57,

    I also recommend trying a templateVariable. You can use this to create a container with a particular name that you can copy in various places in the variable pane and change the names of the properties of confined there.

  • Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    CREATE or REPLACE (name in varchar2) procedure Compress_tab_partition
    is
    last_mnth_var varchar2 (8);
    curr_mnth_var varchar2 (8);
    number of last_mnth;
    number of curr_mnth;
    last_partition varchar2 (8);
    high_val varchar2 (4000);
    Start

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;
    Select to_char (sysdate, 'YYYY') | TO_CHAR (sysdate, 'mm') | ' 00' in the double curr_mnth_var;
    Select to_number (last_mnth_var) in the double last_mnth;
    Select to_number (curr_mnth_var) in the double curr_mnth;

    Dbms_output.put_line ('Compression of GOLDMGR Table scores.' | table-name |) "to go". ») ;
    Dbms_output.put_line(' ');

    / * Step 1 - identify the name of the partition of the specified table must be compressed * /.
    Select high_value from high_val from user_tab_partitions where table_name = table-name;
    Select nom_partition into last_partition from user_tab_partitions where table_name = table-name and high_value = rtrim (high_val);

    / * Step 2 - Alter partition table to compress * /.

    run immediately "ALTER TABLE GOLDMGR." | table_name | ' CHANGE THE PARTITION '. last_partition | "COMPRESS by low query";

    / * Step 3 - Index rebuild step * /.

    I'm in (select index_name in user_indexes where table_name = table-name)
    loop
    run immediately "ALTER INDEX GOLDMGR." | i.index_name |' REBUILD ";
    end loop;

    Dbms_output.put_line (' COMPLETED: compress the Table partitions change.) ") ;

    end;
    /

    I'm getting an error like: Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    Please resolve.

    HIGH_VALUE datatype is LONG. You may not use for a long TIME in WHERE clause expressions. You need to loop through the partitions by selecting HIGH_VALUE and then comparing. Secondly, there is no need to select double to calculate expressions. For example:

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;

    should be replaced by

    last_mnth_var: = to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00'.

    and there is no need to add_months here:

    last_mnth_var: = to_char (trunc (sysdate, 'MM') - 1, "YYYYMM"). ' 00'.

    But the main question is simply ALTER TABLE MODIFY PARTITION COMPRESS allows compression but does not compress. You must issue ALTER TABLE MOVE PARTITION COMPRESS:

    SQL > create table tbl (n) partition by range (n)
    2 (partition p1 values less than (maxvalue))
    3. Select lpad('X',4000,'X') from dual connect by level<=>
    4.

    Table created.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. change the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. move the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    8388608

    SQL >

    SY.

  • LONG data type in a database read-only

    I would only run this query...

    SELECT MAX (nrr_id) AS nrr_id, LENGTH (nrr_narrative) AS nrr_narrative_length
    Stories
    GROUP OF LENGTH (nrr_narrative)
    ORDER BY 2;

    The problem is, nrr_narrative is a LONG data type, so LENGTH won't work.

    I did the game of legs (on the web) and saw several interesting ways to get around this restriction for the long data type The problem is, they need either SysEx in a new table and redesign of the LONG like a LOB (or similar) or write a stored procedure or function that re - throws the column and returns the length. I can't do either (or one of the other more esoteric suggestions) because the table exists in a database I am not and that I don't have very few privileges.

    I could create a link to db on my server to the external source and make the overhaul in a table (or by using a stored procedure) on my server, but the connection is slow and even a simple select on a db link expires quite frequently.

    You can write the PL/SQL code. Something like:

    DECLARE
        TYPE nrr_id_tbl_type IS TABLE OF NUMBER
          INDEX BY PLS_INTEGER;
        v_nrr_id_tbl nrr_id_tbl_type;
        v_len NUMBER;
    BEGIN
        FOR v_rec IN (SELECT nrr_id,nrr_narrative FROM narratives) LOOP
          IF v_nrr_id_tbl.EXISTS(LENGTH(v_rec.nrr_narrative))
            THEN
              v_nrr_id_tbl(LENGTH(v_rec.nrr_narrative)) := GREATEST(
                                                                    v_nrr_id_tbl(LENGTH(v_rec.nrr_narrative)),
                                                                    v_rec.nrr_id
                                                                   );
            ELSE
              v_nrr_id_tbl(LENGTH(v_rec.nrr_narrative)) := v_rec.nrr_id;
          END IF;
        END LOOP;
        v_len := v_nrr_id_tbl.FIRST
        FOR v_i IN 1..v_nrr_id_tbl.COUNT LOOP
          DBMS_OUTPUT.PUT_LINE('LENGTH(nrr_narrative) = ' || v_len || ', MAX(nrr_id) = ' || v_nrr_id_tbl(v_len));
          v_len := v_nrr_id_tbl.NEXT(v_len);
        END LOOP;
    END;
    /
    

    SY.
    P.S. It will not work if nrr_narrative is greater than 32760, which is the maximum length of the LONG PL/SQL data type.

    Published by: Solomon Yakobson on 13 December 2011 14:52

  • Using DBMS_DATAPUMP with the LONG data type

    I have a procedure below that calls the DBMS_DATAPUMP procedure using a REMOTE_LINK move a schema of one database to another. However, some tables in this schema have columns with the data type of LONG. And when I run it I get an error saying that you cannot move the data with the LONG data type using a REMOTE CONNECTION. So no data in these specific tables gets flying over.

    Does anyone else have this problem? If so, do you have a work around? I tried to add a CLOB column in my table and affecting the new CLOB equal THROUGHOUT, but I couldn't get that to not work either... even when I tried to use a TO_LOB. If I could get that pass, then I could just slide ALONG, the schema, and then re-create the LONG column on the opposite side.

    Here is my procedure...



    DECLARE
    / * IMPORT/EXPORT VARIABLES * /.
    v_dp_job_handle NUMBER;          -The handful of job data pump
    v_count NUMBER;          -Index of the loop
    v_percent_done NUMBER;          -Percentage of job complete
    v_job_state VARCHAR2 (30);     -To keep track of job status
    v_message KU$ _LOGENTRY;     -For error messages and work in PROGRESS
    v_job_status KU$ _JOBSTATUS;     -The State of the work of get_status
    v_status KU$ _STATUS;     -The status returned by get_status object
    v_logfile NUMBER;
    T_DATE VARCHAR2 (13).
    v_source_server_name VARCHAR2 (50);
    v_destination_server_name VARCHAR2 (50);

    BEGIN
    v_project: = 'TEST ';
    T_DATE: = TO_CHAR (SYSDATE, 'MMDDYYYY_HHMI');
    v_source_server_name: = 'TEST_DB ';

    v_dp_job_handle: = DBMS_DATAPUMP. OPEN)
    OPERATION = > "IMPORT."
    JOB_MODE = > "SCHEMA."
    REMOTE_LINK = > v_source_server_name,
    JOB_NAME = > v_project | ' _EXP_' | T_DATE,
    VERSION = > 'LAST');

    v_logfile: = DBMS_DATAPUMP. KU$ _FILE_TYPE_LOG_FILE;

    DBMS_DATAPUMP. ADD_FILE)
    MANAGE = > v_dp_job_handle,
    FILENAME = > v_project | ' _EXP_' | T_DATE |'. JOURNAL '.
    DIRECTORY = > 'DATAPUMP. "
    FILETYPE = > v_logfile);

    DBMS_DATAPUMP. () METADATA_FILTER
    MANAGE = > v_dp_job_handle,
    NAME = > 'SCHEMA_EXPR ',.
    VALUE = > ' = "' | v_project | " ' ') ;

    DBMS_DATAPUMP. START_JOB (v_dp_job_handle);

    v_percent_done: = 0;
    v_job_state: = "UNDEFINED";

    WHILE (v_job_state! = "COMPLETED") AND (v_job_state! = "STOPPED")
    LOOP
    DBMS_DATAPUMP. GET_STATUS)
    v_dp_job_handle,
    DBMS_DATAPUMP. KU$ _STATUS_JOB_ERROR + DBMS_DATAPUMP. KU$ _STATUS_JOB_STATUS + DBMS_DATAPUMP. KU$ _STATUS_WIP.
    -1,
    v_job_state,
    v_status);

    v_job_status: = v_status. JOB_STATUS;

    IF v_job_status. PERCENT_DONE! = v_percent_done THEN
    DBMS_OUTPUT. Put_line ('* percent of the job done = ' |) To_char (v_job_status. PERCENT_DONE));
    v_percent_done: = v_job_status. PERCENT_DONE;
    END IF;

    IF BITAND (v_status. MASK, DBMS_DATAPUMP. KU$ _STATUS_WIP)! = 0 THEN
    v_message: = v_status. WORK IN PROGRESS;
    ELSIF BITAND (v_status.mask, DBMS_DATAPUMP. KU$ _STATUS_JOB_ERROR)! = 0 THEN
    v_message: = v_status. ERROR;
    ON THE OTHER
    v_message: = NULL;
    END IF;

    IF v_message IS NOT NULL THEN
    v_count: = v_message. FIRST;
    While v_count IS NOT NULL
    LOOP
    DBMS_OUTPUT. Put_line (v_message (v_count). LOGTEXT);
    v_count: = v_message. Next (v_count);
    END LOOP;
    END IF;
    END LOOP;

    DBMS_OUTPUT. Put_line ("' job has completed");
    DBMS_OUTPUT. Put_line (' State of the Final work = ' | v_job_state);

    DBMS_DATAPUMP. Detach (v_dp_job_handle);
    END;

    TO_LOB can be used to insert, create table in select and update the instructions to convert

    So: You simply cannot use it in SELECT..., you can use CREATE TABLE BLAH AS SELECT TO_LOB (LONG_COLUMN) OF DREADED_TABLE_WITH_LONG_COL;

  • As an operator with the long data type

    Oracle 10g.

    Hi gurus

    I want to apply as an operator on the long data type, but I get the error message, can you please help me why is that I use as an operator with the long data type. I did some research and but unable to find a solution, see query for more details below...

    Query

    SELECT trigger_body FROM user_triggers

    WHERE trigger_body LIKE '% UPDA % CASE % ';

    Error

    ORA-00932: inconsistent data types: expected NUMBER got LONG

    00932 00000 - ' incompatible data types: wait %s %s got. "

    * Cause:

    * Action:

    Error on line: column 2: 7

    Concerning

    Muzz

    Adrian Billington wrote to the top of your options.

    working with long columns

  • Syntex to create the table with the long data type

    I'm looking to create a table based on another table that having the column long data type. Throw the error ORA-00997: illegal use of the LONG data type


    I tired it

    create table abc_long (ag bgd long number);

    create table abc_long_dummy as ( ) Select *of abc_long); - ORA-00997 error: illegal use of the LONG data type

    How to get there?

    I'm looking to create a table based on another table that having the column long data type.

    You really don't want to do that.

    LONG data type has been deprecated for some time now, use CLOB.

    The TO_LOB() function will do the conversion on the fly:

    create table abc_long_dummy
    as
    select ag
         , to_lob(bgd) as bgd
    from abc_long ;
    

Maybe you are looking for