Insert the problem using a SELECT table with an index by TRUNC function

I came across this problem when you try to insert a select query, select returns the correct results, but when you try to insert the results into a table, the results are different. I found a work around by forcing a selection order, but surely this is a bug in Oracle as how the value of select statements may differ from the insert?

Platform: Windows Server 2008 R2
11.2.3 Oracle Enterprise Edition
(I've not tried to reproduce this on other versions)

Here are the scripts to create the two tables and the data source:
CREATE TABLE source_data
(
  ID                 NUMBER(2),
  COUNT_DATE       DATE
);

CREATE INDEX IN_SOURCE_DATA ON SOURCE_DATA (TRUNC(count_date, 'MM'));

INSERT INTO source_data VALUES (1, TO_DATE('20120101', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120102', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120103', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120201', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120202', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120203', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120301', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120302', 'YYYYMMDD'));
INSERT INTO source_data VALUES (1, TO_DATE('20120303', 'YYYYMMDD'));

CREATE TABLE result_data
(
  ID                 NUMBER(2),
  COUNT_DATE       DATE
);
Now, execute the select statement:
SELECT id, TRUNC(count_date, 'MM')
FROM source_data
GROUP BY id, TRUNC(count_date, 'MM')
You should get the following:
1     2012/02/01
1     2012/03/01
1     2012/01/01
Now insert in the table of results:
INSERT INTO result_data
SELECT id, TRUNC(count_date, 'MM')
FROM source_data
GROUP BY id, TRUNC(count_date, 'MM');
Select the table, and you get:
1     2012/03/01
1     2012/03/01
1     2012/03/01
The most recent month is repeated for each line.

Truncate your table and insert the following statement and results should now be correct:
INSERT INTO result_data
SELECT id, TRUNC(count_date, 'MM')
FROM source_data
GROUP BY id, TRUNC(count_date, 'MM')
ORDER BY 1, 2;
If someone has encountered this problem before, could you please let me know, I don't see what I make a mistake because the selection results are correct, they should not be different from what is being inserted.

Published by: user11285442 on May 13, 2013 05:16

Published by: user11285442 on May 13, 2013 06:15

Most likely a bug in 11.2.0.3. I can reproduce on Red Hat Linux and AIX.

You can perform a search on MOS to see if this is a known bug (very likely), if not then you have a pretty simple test box to open a SR with.

John

Tags: Database

Similar Questions

  • When I try to run Age Of Empires with the CD in, I get a message "Please insert the right CD-ROM, select OK and restart the application.

    Former title: Trouble running games CD, post installation under Vista. That is to say 2 AoE, Warrior kings.

    I have vista on my laptop, I installed games like shogun and medieval total war and they both work perfectly, I tried to put it on the age empires and warrior kings: battles who are also on a cd format, I installed the last but they usually run after that. Although the instialltion is over, I get asked if I wanted to leave the program to run as administrator. : s

    DVD/CD drive recognize there is a disc, but does not work automatically. I can't install the program normally when I run the setup.exe for the game. When I try to run the program with the CD in, I get a message "Please insert the right CD-ROM, select OK and restart the application.

    I tried to run them in compatibility mode, using all variants. and also I tried soome of advice from the help article about the disk drivers. game discs are clean and one striped.

    Why can I install the program and access the drive to use the files it contains, but then not use the disk?

    Hello
     

    This problem may occur if one of the following conditions is true:
    a. you do not use the game disc to start the program.
    b. the CD player is not compatible with the program.
    c. using a copy of the program CD.
    d. you are not connected to the computer as an administrator.
    e. the programs interfere with the start of the game which is running but is invisible to you.
    f. the CD-ROM drive uses out-of-date drivers.
     
     
    I would ask you to try the methods listed in the article below:
    Error message or the game stops responding on the "Loading" screen when you start a Microsoft game: "insert the right CD.
    http://support.Microsoft.com/kb/228985/en-us

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • How to use several adf 12 shape and insert the form data in to table during the click on "submit" button

    How to use several adf 12 shape and insert the form data in to table during the click on "submit" button. Can we use several form from adf or not?

    Make sure that you dragged the VO based EO.

    Also make sure that the VO attributes based EO Updatable property.

    The query according to VO is used only to add LOV to the column of the original VO ModelId.

    See you soon

    AJ

  • Copy a table with its index of Oracle 12 to another instance oracle 12

    Hello

    I m using 64 bit Win8

    I have a huge table T1 (about 200 million) on user storage space and its index is on different tablespaces on DB1

    I built an other empty DB2 with the same names of storage spaces. I d like copy the table T1 of DB1 with all its indexes in DB2 so that the table will in User tablespace and the index go to their corresponding storage spaces.

    Is it possible to do?

    Currently I T1 to export into a CSV file and re - import to DB2 and build all indexes manually.

    Concerning

    Hussien Sharaf

    1. What is the exact syntax to export and import a table with its index?

    You will need to use the "Table". An export of table mode is specified by the parameter TABLES. Mode table, only a specified set of tables, partitions, and their dependent objects are unloaded. See: https://docs.oracle.com/cloud/latest/db121/SUTIL/dp_export.htm#i1007514

    2 How can I import the indexes in one tablespace other than the table itself?

    You can only export the table first without the index by specifying the EXCLUSION clause in order to exclude from the index (see: https://docs.oracle.com/cloud/latest/db121/SUTIL/dp_export.htm#i1007829) and then manually create the index and specify the different tablespace when you create.

  • bug using dbms_redefinition on table with the altered text index?

    I think I can found a bug when you use DBMS_REDEFINITION on a table with a text index that has been modified using ALTER INDEX index-name REBUILD PARAMETERS (REPLACE...). It seems that DBMS_REDEFINITION does not recognize the syntax with REPLACE and redefining fails. However, if I remove the text index and re-create it with all the parameters set during the initial creation and no ALTER INDEX command, then redo the redefinition, it works correctly. I have provided below a script that reproduces the problem, then use workaround mentioned. I have provided a copy of the script and executing the script separately, so that it can be copied and pasted to reproduce the problem. It is a simplification of a problem which has emerged over the diagnosis of a larger problem presented by someone on another forum, where the objective was to perform a loop on a group of tables that meet certain criteria and change some columns varchar2, nvarchar2 columns of these tables, where there are indexes in full text on the other columns in the tables and indexes have been changed using the syntax above. This seems to be a bug or am I missing something or is at - it an easier solution for the redefinition?

    -version:
    SCOTT@orcl_11gR2> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    5 rows selected.
    
    SCOTT@orcl_11gR2>
    -run the script:
    SCOTT@orcl_11gR2> -- table, data, altered text index:
    SCOTT@orcl_11gR2> CREATE TABLE t_test
      2    (col1  NUMBER PRIMARY KEY,
      3       col2  VARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> INSERT INTO t_test VALUES (1, 'A', 'test data')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> CREATE INDEX i1 ON t_test (col3) INDEXTYPE IS CTXSYS.CONTEXT
      2  /
    
    Index created.
    
    SCOTT@orcl_11gR2> ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)')
      2  /
    
    Index altered.
    
    SCOTT@orcl_11gR2> SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
      2  /
    
          COL1 COL2       COL3
    ---------- ---------- ----------
             1 A          test data
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- redefinition that fails:
    SCOTT@orcl_11gR2> CREATE TABLE t_test_interim
      2    (col1  NUMBER,
      3       col2  NVARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> DECLARE
      2    v_num_errors  NUMBER;
      3  BEGIN
      4    DBMS_REDEFINITION.CAN_REDEF_TABLE
      5        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      6    DBMS_REDEFINITION.START_REDEF_TABLE
      7        (USER, 'T_TEST', 'T_TEST_INTERIM',
      8         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
      9          DBMS_REDEFINITION.CONS_USE_PK);
     10    DBMS_REDEFINITION.SYNC_INTERIM_TABLE
     11        (USER, 'T_TEST', 'T_TEST_INTERIM');
     12    DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
     13        (USER, 'T_TEST', 'T_TEST_INTERIM',
     14         DBMS_REDEFINITION.CONS_ORIG_PARAMS,
     15         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
     16    DBMS_REDEFINITION.FINISH_REDEF_TABLE
     17        (USER, 'T_TEST', 'T_TEST_INTERIM');
     18  END;
     19  /
    DECLARE
    *
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11000: invalid keyword REPLACE
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1364
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 2025
    ORA-06512: at line 12
    
    
    SCOTT@orcl_11gR2> -- clean up the mess:
    SCOTT@orcl_11gR2> DROP MATERIALIZED VIEW t_test_interim
      2  /
    
    Materialized view dropped.
    
    SCOTT@orcl_11gR2> DROP TABLE t_test_interim CASCADE CONSTRAINTS
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2> BEGIN
      2    DBMS_REDEFINITION.ABORT_REDEF_TABLE
      3        (USER, 'T_TEST', 'T_TEST_INTERIM');
      4  END;
      5  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- drop and recreate index with all parameters without altering:
    SCOTT@orcl_11gR2> DROP INDEX I1
      2  /
    
    Index dropped.
    
    SCOTT@orcl_11gR2> CREATE INDEX I1 ON T_TEST (COL3) INDEXTYPE IS CTXSYS.CONTEXT
      2  PARAMETERS ('SYNC (ON COMMIT)')
      3  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- redo redefinition:
    SCOTT@orcl_11gR2> CREATE TABLE t_test_interim
      2    (col1  NUMBER,
      3       col2  NVARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> DECLARE
      2    v_num_errors  NUMBER;
      3  BEGIN
      4    DBMS_REDEFINITION.CAN_REDEF_TABLE
      5        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      6    DBMS_REDEFINITION.START_REDEF_TABLE
      7        (USER, 'T_TEST', 'T_TEST_INTERIM',
      8         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
      9          DBMS_REDEFINITION.CONS_USE_PK);
     10    DBMS_REDEFINITION.SYNC_INTERIM_TABLE
     11        (USER, 'T_TEST', 'T_TEST_INTERIM');
     12    DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
     13        (USER, 'T_TEST', 'T_TEST_INTERIM',
     14         DBMS_REDEFINITION.CONS_ORIG_PARAMS,
     15         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
     16    DBMS_REDEFINITION.FINISH_REDEF_TABLE
     17        (USER, 'T_TEST', 'T_TEST_INTERIM');
     18  END;
     19  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> DROP TABLE t_test_interim CASCADE CONSTRAINTS
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2> -- results:
    SCOTT@orcl_11gR2> DESC t_test
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     COL1                                               NUMBER
     COL2                                               NVARCHAR2(10)
     COL3                                               CLOB
    
    SCOTT@orcl_11gR2> COLUMN col3 FORMAT A10
    SCOTT@orcl_11gR2> SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
      2  /
    
          COL1 COL2       COL3
    ---------- ---------- ----------
             1 A          test data
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- clean-up:
    SCOTT@orcl_11gR2> DROP TABLE t_test
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2>
    -script:
    -- table, data, altered text index:
    CREATE TABLE t_test
      (col1  NUMBER PRIMARY KEY,
       col2  VARCHAR2 (10),
       col3  CLOB)
    /
    INSERT INTO t_test VALUES (1, 'A', 'test data')
    /
    CREATE INDEX i1 ON t_test (col3) INDEXTYPE IS CTXSYS.CONTEXT
    /
    ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)')
    /
    SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
    /
    -- redefinition that fails:
    CREATE TABLE t_test_interim
      (col1  NUMBER,
       col2  NVARCHAR2 (10),
       col3  CLOB)
    /
    DECLARE 
      v_num_errors  NUMBER;
    BEGIN 
      DBMS_REDEFINITION.CAN_REDEF_TABLE
        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.START_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
          DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.SYNC_INTERIM_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
      DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         DBMS_REDEFINITION.CONS_ORIG_PARAMS, 
         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
      DBMS_REDEFINITION.FINISH_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    -- clean up the mess:
    DROP MATERIALIZED VIEW t_test_interim
    /
    DROP TABLE t_test_interim CASCADE CONSTRAINTS
    /
    BEGIN 
      DBMS_REDEFINITION.ABORT_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    -- drop and recreate index with all parameters without altering:
    DROP INDEX I1
    /
    CREATE INDEX I1 ON T_TEST (COL3) INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('SYNC (ON COMMIT)')
    /
    -- redo redefinition:
    CREATE TABLE t_test_interim
      (col1  NUMBER,
       col2  NVARCHAR2 (10),
       col3  CLOB)
    /
    DECLARE 
      v_num_errors  NUMBER;
    BEGIN 
      DBMS_REDEFINITION.CAN_REDEF_TABLE
        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.START_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
          DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.SYNC_INTERIM_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
      DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         DBMS_REDEFINITION.CONS_ORIG_PARAMS, 
         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
      DBMS_REDEFINITION.FINISH_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    DROP TABLE t_test_interim CASCADE CONSTRAINTS
    /
    -- results:
    DESC t_test
    COLUMN col3 FORMAT A10
    SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
    /
    -- clean-up:
    DROP TABLE t_test
    /

    No real workaround DBMS_REDEFINITION uses function DBMS_METADATA. GET_DDL() and a string of invalid parameter is returned due to known bugs when you use the ALTER INDEX REBUILD with parameter REPLACE; try to avoid changing the index with REPLACE if you export or use DBMS_REDEFINITION for this table/index.

    Note to change the text index metadata, to change the existing class preference, you can use the REPLACE METADATA, IE

    ALTER INDEX i1 REBUILD PARAMETERS ("replace metadata sync (on commit)" ");

    Will not rebuild the index so that your DOF is to rebuild the index

    ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)")

  • Delete the line feature in a Table with Multiselect LOV

    [Issue]

    Is it possible to add a remove function line in a Table Advancced with Multiselect LOV?

    [Reminder]

    I created a page OFA by "LOV Multiselect for Advanced of Table" according to the developer's guide.
    This is the expected behavior.

    • The values in the LOV screen have been added to the table in the main screen.
    • The values selected in the new LOV screen have been inserted to the table in the basic screen by additions.

    Then, when I have attached an icon to remove a table, it was not the expected behavior.

    • The values in the LOV screen have been added to the table in the main screen.
    • Again selected in the screen LOV values were NOT inserted into the table of the basic screen by additions.

    The deletion icon was created according to the tutorial from the OFA (Chapter 2: lessons from Core - delete)
    and here are the properties of the element.

    • customer action type: fireAction
    • form: true
    • paraemter name: target
    • parameter value: 1 (nominal value)

    Before attaching the trash icon,
    When the user select values in the LOV screen, processFormRequest method in the basic screen is executed.

    But after attaching the trash icon,
    When the user select values in the LOV screen, processFormRequest method in the basic screen is NOT executed.

    Is it possible to add a remove function line in a Table Advancced with Multiselect LOV?

    Best regards

    Eimei

    The problem was solved by changing a parameter name.

    It seems that the parameter name 'target' is used in a standard program.

  • Insert the values of multiple selection

    Hello

    I have a list of multiple selection on my page and I want to insert this list in my database. Now, I want to create a new line for each of the selected values. My table has three rows. ID, GET_ID, PAR_ID. In my page, you can select the GET_ID. Then you have a list of multiple selection for PAR_ID (here, you choose more options). Now the script should put in the table so the format looks like this:
    ID        GET_ID      PAR_ID
    1         1               1
    2         1               2
    3         1               3
    4         2               1
    5         2               2
    
    etc..
    When I use the automated process of line it will insert the data as PAR_ID 1:2:3 and this isn't what I want. I think I must create a PL/SQL procedure with a loop, but my knowledge of pl/sql is not very good. If anyone can put me in the right direction?

    Kind regards
    Wijnand

    Hello Wijnand,

    I did sort of like this:

    DECLARE
    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    whole i_exists;
    BEGIN
    --
    -Convert the string two points separated values in
    -a table of PL/SQL
    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P1_MULTISELECTLIST);

    --
    -Loop through the array to insert
    --
    BECAUSE me IN 1.l_selected.count
    LOOP
    SELECT count (*) in i_exists
    TABLE
    WHERE TABLE_PK = l_selected (i);

    IF i_exists > 0 THEN
    null; -DO NOTHING
    ON THE OTHER
    INSERT INTO TABLE (...) values (...);
    END IF;

    END LOOP;
    END;

    BR, Paul

  • Insertion XMLAgg large output in a table with a CLOB column

    Hello

    I need to fill a CLOB column in a table with the output of a query select using XMLAgg which returns a string length exceeds the maximum length of the SQL 32767octets.

    The table I ask has 300,000 lines I need to create an XML file. When I apply the query below (without XMLAgg) I get 300 000 lines that each of the 134 characters each. However, when I add the XMLAgg I can't select the results as XMLAgg concatenates my 300,000 lines in a single line, where a length of string is too long for SQL.

    SELECT (XMLElement ("line", XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_1' "colName"), attribute1)
    XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_2' "colName"), attribut2)
    XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_3' "colName"), attribut3))
    )
    of XML_TAGS_TABLE
    -Produces 300,000 lines like below
    < row > < cell colName = "XML_TAG_1" > 12345 < / cell > < cell colName = "XML_TAG_2" > abcdef < / cell > < cell colName = "XML_TAG_3" > 123xyz < / cell > < / row >

    With this in mind, I created a temporary table (TEMP_TAB_TEST) with a column called XML_ROW that is a CLOB. Applying XMLAgg in the above query, I would get 300,000 lines concatenated into a string. I need to get the single string output in the XML_ROW (CLOB) column XMLAgg while I can then convert them to the XML file.

    I don't see how I can use XMLAgg due to the length of the output it produces? Is there a way I can fill the column clob using the XMLAgg is the result of a PL/SQL package / block Anon?

    Thank you very much
    Simon.

    It works for me:

    CREATE TABLE TESTCLOB (ID NUMBER, DATA CLOB);
    
    insert into testclob (
      id,
      data
    ) values (
      1,
      (SELECT XMLTYPE.getClobVal(XMLAGG( XMLElement("row", XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_1' COL1),attribute1)
                                        ,XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_2' COL2) ,attribute2)
                                        ,XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_3' COL3),attribute3))
                                       )
                                 )
         from (SELECT 'XXXXX' attribute1, 'xxxxxx' attribute2, 'yyyyyyy' attribute3 from dual connect by level<1000000)
      )
    );
    
    SELECT ID, DBMS_LOB.GETLENGTH(DATA) FROM TEXTCLOB;
    
    ID                     DBMS_LOB.GETLENGTH(DATA)
    ---------------------- ------------------------
    1                      118999881                
    
  • Using subset of table with loops

    I have a 2D (m * n) table and I want to look at a subset of this table (x * y). I am having some problems using the subset of the table by doing this. If I want to browse 'y' columns of items containers 'x', I thought I could use a loop with the function of the subset of the array for interior but the resulting table I receive is actually a populated by the diagonal elements of my natal chart. I enclose my current VI where I hope that things.

    For example, if I load an image that is 800px * 600px then my program creates an array of 800 * 600 and each element is the maximum of the value of red, green and blue pixel. So, I want to watch the first 320px * 600px (which is a subset of the array with size 320 * 600). So, how can I use subset table properly to generate that 2d hack? My goal after this step would be to perfom some basic mathematical calculations like averaging on the subset.

    This is what you want?

  • Fix for the problems of release of WebHelp with IE 11 breaks search

    I use RoboHelp HTML 9 and you had problems with WebHelp generated in IE 11. The table of contents was completely empty and the 'Search' tab was going well, but have not worked. Everything worked fine in Firefox. After much research online and experimenting in these forums and elsewhere, I was able to get the table of contents to display properly in IE 11 (and Firefox), but the fix caused the Search tab to stop functioning in accordance with this other forum post RH9 Webhelp search function does not work properly.

    I need to have BOTH COT and research displays and works correctly but in order to get the table of contents displays correctly I had to change the preferred Format "Pure HTML" and, according to the above-mentioned position setting, it's what messes up the search function. is there a solution that will enable the TOC and research work properly?

    Here is a summary of the steps I took to get to this point:

    • Tested WebHelp output of two different projects myself so that the startup project Salesbuilder - all would display or function properly in Firefox but not in IE (empty TOC and non-functional research) 11.
    • Find a "patch" for RH10 exactly the problem I have experienced with RH9 but wasn't able to find a version for RH9. Since the patch included only 2 files (whutils.js and whver.js), I saved these files in the RoboHTML\WebHelp5Ext\template_stock directory and replace them with the new.
    • Regenerated one of my RoboHelp projects - still does not work in IE 11 and now does not work in Firefox either!
    • Tried to turn on mark of the Web but this did not help and did not allow for opening PDF that is necessary for one of the projects, I turned it again.
    • Change the preferred Format setting "Pure html" instead of "DHTML" and the table of contents displays and worked properly in 11 IE and Firefox! Hooray!
    • Celebrated for 10 seconds until I clicked on the "Search" tab and see the input box filled with letters of the alphabet with other random letters, words, numbers below. It looks almost like an index, but none of my projects using an index and I've not generated one or the other project.
    • Found the post mentioned above which States that the solution is to change the preferred Format of DHTML, but when I do this I am back empty TOC and look clean but non-functional search!
    • I have now deleted the search the output of one of the projects tab, it is not really necessary, but I need to find a solution for this for my other project.

    Two of my projects are run locally - it is documentation that is distributed on a CD release and the other is CSH, which is loaded on the local server with the software for which it was created.

    Dorothy

    Note to administrators: Sorry, but I posted this in response to a previous post , summary, Index, & Research do not appear in the generated... help -then perhaps it should be removed from this thread to avoid confusion.

    There is an official fix for RoboHelp 9 IE10. But who is unable to solve your problem. If you PM me, I can send you a pre-test to fix IE11 on RH9 to see if it works in your situation.

    The only real solution is probably to update RH11.

    Kind regards

    Willam

  • The problem at popup_menu binding table

    Hello

    I'm the first attempt at coding a plugin for LR. I just did most of the work I need, but now I'm stuck with a delicate problem, I can't solve my self

    In a LrDialogs, I want to display a contextual menu (aka combobox) with a list of all the collection and collectionsand of the catalog.

    To retrieve the list of collection, I call getChildCollectionSets and getChildCollections recursively and put the results in a table. The problem is that I call them leave in a LrTask, waiting for the full main UI thread and so nothing appears in the drop-down list. It seems that the combo was built so that the table that bind the items property was empty and when it was settled the GUI was not be notified.

    Surely, I missed something... can point you in the right direction?

    Here's the code I'm using (just an example)

    local LrView = import 'LrView'
    local LrTasks = import "LrTasks"
    local LrBinding = import 'LrBinding'
    local LrDialogs = import 'LrDialogs'
    local LrApplication = import 'LrApplication'
    local LrFunctionContext = import 'LrFunctionContext'
    local LrStringUtils = import 'LrStringUtils'
    
    
    LrFunctionContext.callWithContext ("CollectionList", function (context) 
              LrDialogs.attachErrorDialogToFunctionContext (context)
    
    
              local collectionsList = {}
    
              LrTasks.startAsyncTask(function ()
                        for key, child in pairs(catalog:getChildCollectionSets()) do
    
                                  local name = LrStringUtils.lower(child:getName())
                                  collectionsList[key] = { title = name, value = child.localIdentifier }
                        end 
              end)
    
              local f = LrView.osFactory()
    
    
              LrDialogs.presentModalDialog {
                        title = "EasyWorkflow", 
                        contents = f:row {
                                  f:row {
                                            f:static_text {
                                                      title = "Collections",
                                            },
                                            f:popup_menu {
                                                      items = collectionsList
                                            },
                                  }
                        }
              }
    end)
    
    

    Place the entire code - bringing together the collections by opening the dialog box - in a single task.

  • How to compare the length of the data to a staging table with the definition of the base table

    Hello
    I have two tables: staging of the table and the base table.
    I get flatfiles data in the staging of the table, depending on the structure of the requirement of staging of the table and the base table (length of each column in the staging table is 25% more data dump without errors) are different for ex: If we have the city long varchar 40 column in table staging there 25 in the base table. Once data are discharged into the intermediate table that I want to compare the actual length of the data for each column in the staging table with the database table definition (data_length for each column of all_tab_columns) and if no column is different length that I need to update the corresponding line in the intermediate table which also has an indicator called err_length.

    so for that I use the cursor c1 is select length (a.id), length (b.SID) of staging_table;
    c2 (name varchar2) cursor is select data_length all_tab_columns where table_name = 'BASE_TABLE' and column_name = name;
    But we get atonce data in the first query while the second slider, I need to get for each column and then compare with the first?
    Can someone tell me how to get the desired results?

    Thank you
    Manoi.

    Hey, Marco.

    Of course, you can set src.err_length in the USING clause (where you can reference all_tab_columns) and use this value in the SET clause.
    It is:

    MERGE INTO  staging_table   dst
    USING  (
           WITH     got_lengths     AS
                     (
              SELECT  MAX (CASE WHEN column_name = 'ENAME' THEN data_length END)     AS ename_len
              ,     MAX (CASE WHEN column_name = 'JOB'   THEN data_length END)     AS job_len
              FROM     all_tab_columns
              WHERE     owner          = 'SCOTT'
              AND     table_name     = 'EMP'
              )
         SELECT     s.ename
         ,     s.job
         ,     CASE WHEN LENGTH (s.ename) > l.ename_len THEN 'ENAME ' END     ||
              CASE WHEN LENGTH (s.job)   > l.job_len   THEN 'JOB '   END     AS err_length
         FROM     staging_table     s
         JOIN     got_lengths     l     ON     LENGTH (s.ename)     > l.ename_len
                             OR     LENGTH (s.job)          > l.job_len
         )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    As you can see, you have to hardcode the names of the columns common to several places. I swam () to simplify that, but I found an interesting (at least for me) alternative grouping function involving the STRAGG user_defined.
    As you can see, only the subquery USING is changed.

    MERGE INTO  staging_table   dst
    USING  (
           SELECT       s.ename
           ,       s.job
           ,       STRAGG (l.column_name)     AS err_length
           FROM       staging_table          s
           JOIN       all_tab_columns     l
          ON       l.data_length  < LENGTH ( CASE  l.column_name
                                              WHEN  'ENAME'
                                    THEN      ename
                                    WHEN  'JOB'
                                    THEN      job
                                       END
                               )
           WHERE     l.owner      = 'SCOTT'
           AND      l.table_name     = 'EMP'
           AND      l.data_type     = 'VARCHAR2'
           GROUP BY      s.ename
           ,           s.job
           )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    Instead of the user-defined STRAGG (that you can copy from AskTom), you can also use the undocumented, or from Oracle 11.2, WM_CONCAT LISTAGG built-in function.

  • Problems using external USB hub with A30

    I have a Toshiba Satellite A30-514 with a USB powered 2.0 hub attached. In it's plugged a powered satellite Receiver/USB modem (for connection broadband), a USB bluetooth adapter and a HP PSC 1350 printer. The first two devices work fine, but the printer is not recognized correctly.

    The powered USB hub is plugged into the first USB port on the laptop. The second USB port on the laptop is used by the receiver for a wireless optical mouse. It must be here otherwise, it does not work.
    If I plug the printer directly into the second USB port on the laptop, it works fine.

    In Device Manager, instead of show all HP devices it comes to peripheral USB Composite in the USB controllers section. It is an orange exclamation next to him.

    If I boot the laptop with all 3 devices plugged into the hub and turned on, the printer is detected fine but the Bluetooth Radio devices have an orange instead exclamation point. I need the bluetooth device to attach a cell phone to the laptop. If I unplug the printer and restart the bluetooth is detected OK. Plug the printer in causes the Composite device to reappear with the exclamation point!

    From left to right, looking at the front of the hub, devices are 1) satellite receiver/modem, 2) Bluetooth printer) 3.

    I hope it's clear. Any help / advice would be received with gratitude.

    Hello

    I think the problem is that one of the devices does not have enough power to operate. This is because a single USB port must provide 3 devices with power. If you have an external power supply to one of the features of this you should use.

    Good bye

  • I lost my connection to the internet, the problem has nothing to do with the input signal. Do everything that contributes to signal the connection disappeared. How can I restore that?

    I remove programs to free up space. now I don't have a connection!

    Hi Steven,

    You get the error message?

    Method 1: Disable the security/firewall program software you run on the computer temporarily and then check if the problem persists.

    How can I turn on or turn off the firewall in Windows XP Service Pack 2 or later versions?

    http://support.Microsoft.com/kb/283673

    If you use a third-party security software, you can check the documentation provided on the software to turn it off.

    Important: Activate Windows Firewall\security software once everything is done.

    Method 2: Follow the steps mentioned in the link below

    How to troubleshoot missing network connections icons in Windows Server 2003 and Windows XP

    http://support.Microsoft.com/kb/825826

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base.
    How to back up and restore the registry in Windows

Maybe you are looking for

  • Tecra R940 - 1 hr: what happens to work out of the box with Linux?

    I'm considering buying a laptop Tecra R940 - 1 hr.I'm going to use it with linux (ubuntu) system. What happens to work out of the box?Should I expect any problems with the display/network/wifi/sound?What about camera, usb 3.0 and bt? What is possible

  • Re: Wireless LAN network has disappeared on my Satellite L655

    Toshiba Satellite L655-1EM My computer is unable to find wireless networks. It was working fine the other day, but does not work when you connect today. I tried FN & F8 but does nothing. It does not show a wireless network card in Device Manager. I t

  • Satellite A200-1IZ: graphics issue

    Hello I bought Toshiba Satellite A200-1iZ 3 daysAnd I've got someone with my chart like this:http://www.fotosik.pl/pokaz_obrazek/pelny/3411bae30709a6b2.html. If I go back, it'll be normal. but this is the 2nd time ;/What should I do?

  • E8350 in Bridge mode allow me access to the router with 192.168.1.1

    I have a small home network with the E8350 (AC2400) and a PK5001A of Qwest ActionTec modem.  I needed to put the router in Bridge mode to enable NAT in the modem works properly.  By simply disabling the NAT in the E8350 network broe. Once I placed th

  • As Device Manager and RUN programs are open with a notebook!

    Programs such as Device Manager, system configuration and RUN, for example, are open with a Notepad in which a lot of things ununderstanable are written with the exception of this sentence: this program cannot be run in DOS mode.I hope you can help m