Oracle Text Help with XML column values

Hello. In addition to being new to Oracle Text, I am inheriting an Oracle Text application and have a couple of questions.
First, A context-based index has been set-up on a CLOB column which contains an XML formatted document. The Auto Section Group parameter has been set to created zones for each tag of the XML document. I have found that when using a browser to display the content of the CLOB, some of the column values have trouble displaying in the browser, where I receive an XML processing error. I believe this is due to the fact that some of the XML document rows contain URLs that are not embedded in the CDATA tag. In any case, if the browser has trouble displaying the XML, will oracle text have trouble indexing the XML and creating the section group zones?
Second, I understand that the NOT operator takes a right operand term and left operand term. Can either of the terms be the results of the WITHIN operator, i.e. "dogs not (cats within animals)".
Thank you.

I bet you just whipped that out, and I thank you with all my
heart, its amazing to me how many ways I tried to do what you did.
Thanks
I have a second question relating to the same problem and
that is in referencing the over state. Currently, I can write
'text' into the text field and see what I have coming in from xml
in its place during the 'up' state.
However, when the timeline hits the 'over' state, the
textfield will display nothing, or 'text' if I have that written
in. I suspect that I am not referencing the'over' state correctly.
Should I add one line of code sort of referencing the text
field and not just the button while in the over state?

Similar Messages

  • Help with creating oracle text index on 2 columns with partial html data

    Hi,
    I need to create an oracle text index on 2 columns.
    TITLE - varchar(255) = contains plain text data
    DESCRIPTION - CLOB = contains partial HTML data
    This is what I created.
    begin
    ctx_ddl.create_preference ('Title_Description_Pref', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute('Title_Description_Pref', 'columns', 'TITLE, DESCRIPTION');
    end;
    begin
    ctx_ddl.create_preference ('bid_lexer', 'BASIC_LEXER');
    ctx_ddl.set_attribute('bid_lexer', 'index_stems', 'ENGLISH');
    ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
    end;
    create index Bid_Title_Index on Bid(title) indextype is ctxsys.context parameters ('LEXER bid_lexer sync (every "sysdate+(1/24)")');
    create index Bid_Title_Desc_Index on Bid(description) indextype is ctxsys.context parameters ('LEXER bid_lexer DATASTORE Title_Description_Pref sync (every "sysdate+(1/24)") filter ctxsys.null_filter section group htmgroup');
    The problem is when I do a CONTAINS(description, '$(auction)')>0. I get results where the descriptions have the "auction" word (which is correct). But, the results also returned rows where the search word is inside an IMG tag. e.g. <img src="http://auction.de/120483" alt="Auction Logo"/>.
    What I would like is to exclude rows where the search word is inside HTML tag attributes, results expected are rows having <a>Auction</a> or <p>For Auction</p> ... etc. Basically stripping the html tags and leave the text contents.
    I'd appreciate some input.
    Thanks,
    Amiel

    Hi,
    I need to create an oracle text index on 2 columns.
    TITLE - varchar(255) = contains plain text data
    DESCRIPTION - CLOB = contains partial HTML data
    This is what I created.
    begin
    ctx_ddl.create_preference ('Title_Description_Pref', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute('Title_Description_Pref', 'columns', 'TITLE, DESCRIPTION');
    end;
    begin
    ctx_ddl.create_preference ('bid_lexer', 'BASIC_LEXER');
    ctx_ddl.set_attribute('bid_lexer', 'index_stems', 'ENGLISH');
    ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
    end;
    create index Bid_Title_Index on Bid(title) indextype is ctxsys.context parameters ('LEXER bid_lexer sync (every "sysdate+(1/24)")');
    create index Bid_Title_Desc_Index on Bid(description) indextype is ctxsys.context parameters ('LEXER bid_lexer DATASTORE Title_Description_Pref sync (every "sysdate+(1/24)") filter ctxsys.null_filter section group htmgroup');
    The problem is when I do a CONTAINS(description, '$(auction)')>0. I get results where the descriptions have the "auction" word (which is correct). But, the results also returned rows where the search word is inside an IMG tag. e.g. <img src="http://auction.de/120483" alt="Auction Logo"/>.
    What I would like is to exclude rows where the search word is inside HTML tag attributes, results expected are rows having <a>Auction</a> or <p>For Auction</p> ... etc. Basically stripping the html tags and leave the text contents.
    I'd appreciate some input.
    Thanks,
    Amiel

  • Oracle text - issue with contains query

    Hello,
    Need urgent help.
    Following code in my procedure is giving me error.
    TYPE c_1 is ref cursor;
    result_cursor c1;
    i_text2 := 'NEW%';
    open result_cursor for
    'select /*+ INDEX_SS_DESC(e cad_addr_idx2 )*/
    from cad_address
    where
    contains(text, {:i_text2}, 1) > 0
    and rec_type in (1,2,3,4)
    order by occur_count desc'
    using
    i_text2;
    ORA-00936: missing expression
    ORA-06512: at "AV_OWNER.MY_PROC", line 43
    ORA-06512: at line 6
    Oracle version is 11.2.0.3.0.
    Thanks,

    check your table is 'text indexed' on this 'Text' column.To knoow more about 'text index' go to
    http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
    Also refer to the below thread where someone had faced issues with CONTAINS clause.
    ORA-20000: Oracle Text error: DRG-10599: column is not indexed

  • I need help with XML Gallery Fade in out transition. somebody please help me :(

    I need help with XML Gallery Fade in out transition. somebody please help me
    I have my post dont want to duplicate it

    The problem doesn't lie with your feed, although it does contain an error - you have given a non-existent sub-category. You need to stick to the categories and sub-categories listed here:
    http://www.apple.com/itunes/podcasts/specs.html#categories
    Subscribing to your feed from the iTunes Store page work as such, but the episodes throw up an error message. The problem lies with your episode media files: you are trying to stream them. Pasting the URL into a browser produces a download (where it should play the file) of a small file which does not play and in fact is a text file containing (in the case of ep.2) this:
    [Reference]
    Ref1=http://stream.riverratdoc.com/RiverratDoc/episode2.mp3?MSWMExt=.asf
    Ref2=http://70.33.177.247:80/RiverratDoc/episode2.mp3?MSWMExt=.asf
    You must provide a direct link to the actual mp3 file. Streaming won't work. The test is that if you paste the URL of the media file (as given in the feed) into the address bar of a browser it should play the file.

  • Oracle text performance with context search indexes

    Search performance using context index.
    We are intending to move our search engine to a new one based on Oracle Text, but we are meeting some
    bad performance issues when using search.
    Our application allows the user to search stored documents by name, object identifier and annotations(formerly set on objects).
    For example, suppose I want to find a document named ImportSax2.c: according to user set parameters, our search engine format the following
    search queries :
    1) If the user explicitely ask for a search by document name, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;
    2) If the user don't specify any extra parameters, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0;
    Oracle text only need around 7 seconds to answer the second query, whereas it need around 50 seconds to give an answer for the first query.
    Here is a part of the sql script used for creating the Oracle Text index on the column OBJFIELDURL
    (this column stores a path to an xml file containing properties that have to be indexed for each object) :
    begin
    Ctx_Ddl.Create_Preference('wildcard_pref', 'BASIC_WORDLIST');
    ctx_ddl.set_attribute('wildcard_pref', 'wildcard_maxterms', 200) ;
    ctx_ddl.set_attribute('wildcard_pref','prefix_min_length',3);
    ctx_ddl.set_attribute('wildcard_pref','prefix_max_length',6);
    ctx_ddl.set_attribute('wildcard_pref','STEMMER','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','fuzzy_match','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','prefix_index','TRUE');
    ctx_ddl.set_attribute('wildcard_pref','substring_index','TRUE');
    end;
    begin
    ctx_ddl.create_preference('doc_lexer_perigee', 'BASIC_LEXER');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'printjoins', '_-');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('doc_lexer_perigee','index_themes','yes');
    ctx_ddl.create_preference('english_lexer','basic_lexer');
    ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    ctx_ddl.set_attribute('english_lexer','theme_language','english');
    ctx_ddl.set_attribute('english_lexer', 'printjoins', '_-');
    ctx_ddl.set_attribute('english_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.create_preference('german_lexer','basic_lexer');
    ctx_ddl.set_attribute('german_lexer','composite','german');
    ctx_ddl.set_attribute('german_lexer','alternate_spelling','GERMAN');
    ctx_ddl.set_attribute('german_lexer','printjoins', '_-');
    ctx_ddl.set_attribute('german_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('german_lexer','NEW_GERMAN_SPELLING','YES');
    ctx_ddl.set_attribute('german_lexer','OVERRIDE_BASE_LETTER','TRUE');
    ctx_ddl.create_preference('japanese_lexer','JAPANESE_LEXER');
    ctx_ddl.create_preference('global_lexer', 'multi_lexer');
    ctx_ddl.add_sub_lexer('global_lexer','default','doc_lexer_perigee');
    ctx_ddl.add_sub_lexer('global_lexer','german','german_lexer','ger');
    ctx_ddl.add_sub_lexer('global_lexer','japanese','japanese_lexer','jpn');
    ctx_ddl.add_sub_lexer('global_lexer','english','english_lexer','en');
    end;
    begin
         ctx_ddl.create_section_group('axmlgroup', 'AUTO_SECTION_GROUP');
    end;
    drop index ADSOBJ_XOBJFIELDURL force;
    create index ADSOBJ_XOBJFIELDURL on ADSOBJ(OBJFIELDURL) indextype is ctxsys.context
    parameters
    ('datastore ctxsys.file_datastore
    filter ctxsys.inso_filter
    sync (on commit)
    lexer global_lexer
    language column OBJFIELDURLLANG
    charset column OBJFIELDURLCHARSET
    format column OBJFIELDURLFORMAT
    section group axmlgroup
    Wordlist wildcard_pref
    Oracle created a table named DR$ADSOBJ_XOBJFIELDURL$I which now contains around 25 millions records.
    ADSOBJ is the table contaings information for our documents,OBJFIELDURL is the field that contains the path to the xml file containing
    data to index. That file looks like this :
    <?xml version="1.0" encoding="UTF-8" ?>
    <fields>
    <OBJNAME><![CDATA[NomLnk_177527o.jpgp]]></OBJNAME>
    <OBJREM><![CDATA[Z_CARACT_141]]></OBJREM>
    <OBJID>295926o.jpgp</OBJID>
    </fields>
    Can someone tell me how I can make that kind of request
    "select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;"
    run faster ?

    Below are the execution plan for both the 2 requests :
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     | Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1      | TABLE ACCESS BY INDEX ROWID     |ADSOBJ      |1272     |119K     |     4     (0)     |
    |     2      |     DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Note
    - 'PLAN_TABLE' is old version
    Executed in 2 seconds
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     |Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1     | TABLE ACCESS BY INDEX ROWID     |ADSOBJ                         |1272     |119K     |     4     (0)     |
    |     2     | DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Sorry for the result formatting, I can't get it "easily" readable :(

  • ORACLE TEXT INDEX ON VARCHAR2 COLUMN

    Hello All,
    I find a search in our application very slow so i thought of using ORACLE TEXT CTXCAT index based search but i find certain inconsistencies . How can this be avoided....The following query should not return result if i can replace with oracle text but i find few values....why is that...i have also given few sample results below....
    SELECT first_name
    FROM uc_partner_ms
    WHERE
    Upper(first_name) LIKE '%WIE%'
    minus
    SELECT first_name
    FROM uc_partner_ms
    WHERE CATSEARCH (first_name,'*wie*', null) > 0
    RESULTS ....
    Hans-Werner Mrowiec
    Heinz Oesterwiemann GmbH
    Helmut Froitzheim GmbH, Neuwied
    Heribert Schwies
    Hermann Twieling GmbH & Co. KG
    Horst Breitwieser
    Horst-Dieter Swie
    The script used for creating index is
    begin
    ctx_ddl.create_preference('mylex', 'BASIC_LEXER');
    ctx_ddl.set_attribute ( 'mylex', 'index_themes', 'NO');
    ctx_ddl.set_attribute ( 'mylex', 'mixed_case', 'NO');
    end;
    CREATE INDEX partner_index ON uc_partner_ms (first_name)
    INDEXTYPE IS CTXSYS.CTXCAT
    parameters ( 'LEXER mylex' );
    Where am i wrong i could not guess a trend in the results other than all being in lower case.....

    Catsearch does not support leading wildcards. As a workaround, you can use a query template with context grammar. Please see the reproduction and solution below.
    SCOTT@orcl_11g> -- test environment:
    SCOTT@orcl_11g> CREATE TABLE uc_partner_ms
      2    (first_name  VARCHAR2 (60))
      3  /
    Table created.
    SCOTT@orcl_11g> SET DEFINE OFF
    SCOTT@orcl_11g> INSERT ALL
      2  INTO uc_partner_ms VALUES ('Hans-Werner Mrowiec')
      3  INTO uc_partner_ms VALUES ('Heinz Oesterwiemann GmbH')
      4  INTO uc_partner_ms VALUES ('Helmut Froitzheim GmbH, Neuwied')
      5  INTO uc_partner_ms VALUES ('Heribert Schwies')
      6  INTO uc_partner_ms VALUES ('Hermann Twieling GmbH & Co. KG')
      7  INTO uc_partner_ms VALUES ('Horst Breitwieser')
      8  INTO uc_partner_ms VALUES ('Horst-Dieter Swie')
      9  SELECT * FROM DUAL
    10  /
    7 rows created.
    SCOTT@orcl_11g> begin
      2    ctx_ddl.create_preference('mylex', 'BASIC_LEXER');
      3    ctx_ddl.set_attribute ( 'mylex', 'index_themes', 'NO');
      4    ctx_ddl.set_attribute ( 'mylex', 'mixed_case', 'NO');
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> CREATE INDEX partner_index ON uc_partner_ms (first_name)
      2  INDEXTYPE IS CTXSYS.CTXCAT
      3  parameters ( 'LEXER mylex' )
      4  /
    Index created.
    SCOTT@orcl_11g> -- reproduction:
    SCOTT@orcl_11g> SELECT first_name
      2  FROM uc_partner_ms
      3  WHERE
      4  Upper(first_name) LIKE '%WIE%'
      5  minus
      6  SELECT first_name
      7  FROM uc_partner_ms
      8  WHERE CATSEARCH (first_name,'*wie*', null) > 0
      9  /
    FIRST_NAME
    Hans-Werner Mrowiec
    Heinz Oesterwiemann GmbH
    Helmut Froitzheim GmbH, Neuwied
    Heribert Schwies
    Hermann Twieling GmbH & Co. KG
    Horst Breitwieser
    Horst-Dieter Swie
    7 rows selected.
    SCOTT@orcl_11g> -- solution:
    SCOTT@orcl_11g> SELECT first_name
      2  FROM uc_partner_ms
      3  WHERE
      4  Upper(first_name) LIKE '%WIE%'
      5  minus
      6  SELECT first_name
      7  FROM   uc_partner_ms
      8  WHERE  CATSEARCH
      9             (first_name,
    10              '<query>
    11              <textquery grammar="CONTEXT">
    12                %wie%
    13              </textquery>
    14            </query>',
    15              null) > 0
    16  /
    no rows selected
    SCOTT@orcl_11g>

  • Oracle SP for comparing 80 column values across 8 table pairs in 2 diff DBs

    Hi All,
    I have an Oracle SP for comparing 80 column values across 8 table pairs in 2 diff DBs.
    However, it is taking hell lot of time around 6hours to process 10,000 records.
    Can anyone suggest how to fine-tune this?
    Thanks guys.

    Tables prefixed with X are the temp tables to store data of DB-A.
    The report will be originally based on DB-B, so DB Links will not be required for @PROD1.WORLD tables.
    This is a test region, so I have pointed to @PROD1.WORLD to test with Prod Data.
    SEC_COMPARE_CONFIG is the config table containing the table_name to be reported, corresponding temp tables to store the data and the columns on which it is to be reported.
    There are in total 8 tables- 90 rows and 8 temp tables.
    SPOKE_TO_HUB_SEC_MTCH_TBL records the securities on which it is to be reported.
    HIST_DATA_COMPARE_TBL is the final results table.
    Here is the entire code:
    CREATE OR REPLACE PACKAGE SECURITY_COMPARE AS
    PROCEDURE          PROCESS_RECORDS       (IN_EFFECTIVE_DATE               IN        DATE,
                                              IN_PRIMARY_ASSET_ID            IN        VARCHAR2    DEFAULT NULL);
    PROCEDURE          IDENTIFY_SECURITIES    ( P_EFFECTIVE_DATE                IN          DATE,
                                                P_PRIMARY_ASSET_ID              IN         VARCHAR2  DEFAULT NULL);
    PROCEDURE           RETREIVE_RECORDS_FROM_SPOKE;
    PROCEDURE           COMPARE_RECORDS(p_err_msg     OUT     VARCHAR2);
    PROCEDURE           INSERT_DATA_TO_TABLE  ( v_target_table VARCHAR2,  v_sql_to_run   VARCHAR2,    v_commit_after NUMBER);
    END SECURITY_COMPARE;
    CREATE OR REPLACE PACKAGE BODY SECURITY_COMPARE AS
    /*Declared String for recording Dynamic SQL's*/
    LC_SQL                  VARCHAR2 (20000);
    PROCEDURE   PROCESS_RECORDS(IN_EFFECTIVE_DATE              IN  DATE,
                                IN_PRIMARY_ASSET_ID          IN  VARCHAR2    DEFAULT NULL)
    AS
    L_EFF_DATE                                        DATE;                      
    L_PRIMARY_ASSET_ID                         VARCHAR2(100);                    
    k_err_msg                                           VARCHAR2(100);                    --Error message displayed in case of NO discretionary records found.
    BEGIN
                    L_EFF_DATE                    := IN_EFFECTIVE_DATE;
                    L_PRIMARY_ASSET_ID     := IN_PRIMARY_ASSET_ID;
                    IDENTIFY_SECURITIES(L_EFF_DATE,L_PRIMARY_ASSET_ID);        --Calling the Identify_Securities procedure to identify the securities older by 90 days from report effective date
                    RETREIVE_RECORDS_FROM_SPOKE();                                        --Retreiving the historic records from the security tables into temporary tables.
                    COMPARE_RECORDS(p_err_msg=>k_err_msg);                          --Compare the records and report the discrepencies into HIST_DATA_COMPARE_TBL table      
    END PROCESS_RECORDS;
    PROCEDURE IDENTIFY_SECURITIES(P_EFFECTIVE_DATE              IN  DATE,
                                                        P_PRIMARY_ASSET_ID               IN  VARCHAR2  DEFAULT NULL)
    AS
    P_EFF_DATE                          DATE;                       --Effective Date of the report
    P_PRIMARY_ID                         VARCHAR2(100);     --Primary AssetID which is used to search based on specific security
    v_target_table                        VARCHAR2(500);     --Variable indicating the Target table for inserting the data
    v_sql_to_run                          VARCHAR2(5000);   --Variable to store the Dynamic SQL to be executed
    v_commit_after                      NUMBER;                --Variable to define after how many records is COMMIT to be done
    BEGIN
            LC_SQL                 :='';
            P_EFF_DATE          := P_EFFECTIVE_DATE;
            P_PRIMARY_ID         := P_PRIMARY_ASSET_ID;
            /*Deleting Old Entries from SPOKE_TO_HUB_SEC_MTCH_TBL table*/
               LC_SQL := 'TRUNCATE TABLE SPOKE_TO_HUB_SEC_MTCH_TBL';
               EXECUTE IMMEDIATE LC_SQL;
            IF(P_PRIMARY_ID is NULL)    --In case records do not need to be identified on basis of specific security
            THEN  
                /*Identify Securities older by 90days from report effective date*/
                     v_target_table := ' SPOKE_TO_HUB_SEC_MTCH_TBL';
                     v_sql_to_run := 'WITH T AS ('||
                                             ' SELECT  R.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_R,'||
                                             ' R.SECURITY_ALIAS SECURITY_ALIAS_R,'||
                                             ' R.LAST_HELD_DATE LAST_HELD_DATE_R,'||
                                             ' R.PREV_HELD_DATE PREV_HELD_DATE_R,'||
                                             ' Q.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_Q,'||
                                             ' Q.SECURITY_ALIAS SECURITY_ALIAS_Q,'||
                                             ' COUNT(*) OVER(PARTITION BY Q.PRIMARY_ASSET_ID) CNT'||
                                            ' FROM  [email protected] R,'||
                                            ' [email protected] Q'||
                                            ' WHERE SYS_OP_MAP_NONNULL(R.last_held_date) <> '||q'!'FF'!'||
                                           ' and ceil(R.last_held_date-to_date('||''''||P_EFF_DATE||''''||')) >= 0'||
                                           ' and ceil(R.last_held_date-to_date('||''''||P_EFF_DATE||''''||')) <= 60'||
                                           ' and R.PRIMARY_ASSET_ID=Q.PRIMARY_ASSET_ID'||
                                           ' )'||
                                          ' SELECT  PRIMARY_ASSET_ID_R,'||
                                          ' SECURITY_ALIAS_R,'||
                                          ' LAST_HELD_DATE_R,'||
                                          ' PREV_HELD_DATE_R,'||
                                          ' PRIMARY_ASSET_ID_Q,'||
                                          ' SECURITY_ALIAS_Q'||
                                          ' FROM  T'||
                                          ' WHERE CNT =1';
                     v_commit_after := 0;
                     INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
            ELSE
                        v_target_table := ' SPOKE_TO_HUB_SEC_MTCH_TBL';
                        v_sql_to_run := 'WITH T AS ('||
                                             ' SELECT  R.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_R,'||
                                             ' R.SECURITY_ALIAS SECURITY_ALIAS_R,'||
                                             ' R.LAST_HELD_DATE LAST_HELD_DATE_R,'||
                                             ' R.PREV_HELD_DATE PREV_HELD_DATE_R,'||
                                             ' Q.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_Q,'||
                                             ' Q.SECURITY_ALIAS SECURITY_ALIAS_Q,'||
                                             ' COUNT(*) OVER(PARTITION BY Q.PRIMARY_ASSET_ID) CNT'||
                                            ' FROM  [email protected] R,'||
                                            ' [email protected] Q'||
                                            ' where R.PRIMARY_ASSET_ID='||''''||P_PRIMARY_ID||''''||
                                            ' and R.PRIMARY_ASSET_ID=Q.PRIMARY_ASSET_ID'||
                                           ' )'||
                                          ' SELECT  PRIMARY_ASSET_ID_R,'||
                                          ' SECURITY_ALIAS_R,'||
                                          ' LAST_HELD_DATE_R,'||
                                          ' PREV_HELD_DATE_R,'||
                                          ' PRIMARY_ASSET_ID_Q,'||
                                          ' SECURITY_ALIAS_Q'||
                                          ' FROM  T'||
                                          ' WHERE CNT =1';
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
            END IF;
            LC_SQL := 'TRUNCATE TABLE HIST_DATA_COMPARE_TBL';
            EXECUTE IMMEDIATE LC_SQL;
    END IDENTIFY_SECURITIES;
    PROCEDURE           RETREIVE_RECORDS_FROM_SPOKE
    AS
    v_target_table                                                      VARCHAR2(500);
    v_sql_to_run                                                        VARCHAR2(5000);
    v_commit_after                                                      NUMBER;
    BEGIN
        LC_SQL :='';
        LC_SQL:= 'TRUNCATE TABLE X_SECMASTER_HISTORY_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_SEC_MASTER_DTL_HIST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_SECMASTER_DTL_EXT_HST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_EQUITY_HIST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_EQUITY_DETAIL_HIST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_FIXED_INCOME_HIST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_FIXED_INCOME_DTL_EXT_TBL';
        EXECUTE IMMEDIATE LC_SQL;
        LC_SQL:= 'TRUNCATE TABLE X_DERIVATIVES_HIST_TBL';
        EXECUTE IMMEDIATE LC_SQL;
            /*SECMASTER_HISTORY*/
            v_target_table := 'X_SECMASTER_HISTORY_TBL';
            v_sql_to_run := ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                                    ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                                    ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                                    ' AND K.SRC_INTFC_INST = 140 '||
                                    ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM  [email protected] H WHERE'||
                                    ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*SECURITY_MASTER_DETAIL_HIST*/
                v_target_table := 'X_SEC_MASTER_DTL_HIST_TBL';
              v_sql_to_run:=       ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                     ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                     ' AND K.SRC_INTFC_INST = 140 '||
                     ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                     ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*SECMASTER_DETAIL_EXT_HIST*/
        v_target_table := 'X_SECMASTER_DTL_EXT_HST_TBL';
               v_sql_to_run:=       ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                     ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                      ' AND K.SRC_INTFC_INST = 140 '||
                      ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                      ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*EQUITY_HIST*/
        v_target_table := 'X_EQUITY_HIST_TBL';
               v_sql_to_run:=        ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                      ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                      ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                       ' AND K.SRC_INTFC_INST = 140 '||
                       ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                       ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*EQUITY_DETAIL_HIST*/
        v_target_table := 'X_EQUITY_DETAIL_HIST_TBL';
             v_sql_to_run:=        ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                     ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                     ' AND K.SRC_INTFC_INST = 140 '||
                     ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                     ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*FIXED_INCOME_HIST*/
            v_target_table := 'X_FIXED_INCOME_HIST_TBL';
               v_sql_to_run:=       ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                     ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                      ' AND K.SRC_INTFC_INST = 140 '||
                      ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                      ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*FIXED_INCOME_DETAIL_EXT_HIST*/
        v_target_table := 'X_FIXED_INCOME_DTL_EXT_TBL';
               v_sql_to_run:=       ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                     ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                      ' AND K.SRC_INTFC_INST = 140 '||
                      ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                      ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
        /*DERIVATIVES_HIST*/
        v_target_table := 'X_DERIVATIVES_HIST_TBL';
           v_sql_to_run:=           ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
                      ' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
                     ' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
                      ' AND K.SRC_INTFC_INST = 140 '||
                      ' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
                      ' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
                           v_commit_after := 0;
                           INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
    END RETREIVE_RECORDS_FROM_SPOKE;
    PROCEDURE           COMPARE_RECORDS(p_err_msg     OUT     VARCHAR2)
    AS
        l_count                                                                 NUMBER;
        l_err_msg                                                             VARCHAR2(100);
        TYPE T_SECURITIES is TABLE of HIST_DATA_COMPARE_TBL%rowtype;
        ttype                                                                    T_SECURITIES;
        CURSOR C1
        IS
        SELECT  TABLE_NAME, TEMP_TABLE, COLUMN_NAME from SEC_COMPARE_CONFIG
        where column_name='EFFECTIVE_DATE';
        CURSOR C2
        IS
        SELECT * FROM SEC_COMPARE_CONFIG where id <=82;
        C_REC                                 SEC_COMPARE_CONFIG%rowtype;
        BEGIN
            LC_SQL :='';
            p_err_msg :='';
                FOR C_REC in C1
                loop  
                                LC_SQL:=     ' SELECT /*+DRIVING_SITE(B)*/ /*+PARALLEL(A,100)*/ B.SECURITY_ALIAS, to_char(C.SPOKE_PAID), A.SECURITY_ALIAS,to_char(C.HUB_PAID),'||''''||C_REC.TABLE_NAME||''''||','||q'!'EFFECTIVE_DATE'!'||','||
                                                    ' NVL((cast(B.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||'),'||
                                                    ' NVL((cast(A.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')'||
                                                    ' FROM '||C_REC.TEMP_TABLE||' A, SECURITYDBO.'||C_REC.TABLE_NAME ||'@PROD1.WORLD B,'||
                                                    ' SPOKE_TO_HUB_SEC_MTCH_TBL C'||                                
                                                    ' WHERE A.SRC_INTFC_INST=140'||
                                                    ' AND B.SRC_INTFC_INST=140'||
                                                    ' AND A.SECURITY_ALIAS=C.spoke_sec'||
                                                    ' and b.security_alias=C.HUB_SEC'||
                                                    ' AND a.effective_date <> (select max(h.effective_date) from SECURITYDBO.'||C_REC.TABLE_NAME||'@PROD1.WORLD H'||
                                                    ' where h.security_alias=c.hub_sec and h.src_intfc_inst=140 )';
                                        EXECUTE IMMEDIATE LC_SQL BULK COLLECT into ttype;
                              FORALL x in ttype.First..ttype.Last
                                        insert into HIST_DATA_COMPARE_TBL values ttype(x);                 
                                        commit;
                end loop;
               For C_REC in C2
                loop
                                LC_SQL:=     ' SELECT /*+DRIVING_SITE(B)*/ /*+PARALLEL(A,100)*/ B.SECURITY_ALIAS, to_char(C.SPOKE_PAID), A.SECURITY_ALIAS,to_char(C.HUB_PAID),'||''''||C_REC.TABLE_NAME||''''||','||''''||C_REC.COLUMN_NAME||''''||','||
                                                    ' NVL((cast(B.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||'),'||
                                                    ' NVL((cast(A.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')'||
                                                    ' FROM '||C_REC.TEMP_TABLE||' A, SECURITYDBO.'||C_REC.TABLE_NAME ||'@PROD1.WORLD B,'||
                                                    ' SPOKE_TO_HUB_SEC_MTCH_TBL C'||                                
                                                    ' WHERE A.SRC_INTFC_INST=140'||
                                                    ' AND B.SRC_INTFC_INST=140'||
                                                    ' AND A.SECURITY_ALIAS=C.spoke_sec'||
                                                    ' and b.security_alias=C.HUB_SEC'||
                                                    ' and b.effective_date=a.effective_date'||
                                                  ' AND NVL((cast(A.'||C_REC.column_name||' as VARCHAR2(100))),'||q'!'No Records Found'!'||') <>'||
                                                    ' NVL((cast(B.'||C_REC.column_name||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')';
                             EXECUTE IMMEDIATE LC_SQL BULK COLLECT into ttype;
                            FORALL x in ttype.First..ttype.Last
                                    insert into HIST_DATA_COMPARE_TBL values ttype(x);                 
                                    commit;
                end loop;
                BEGIN
                    select  count(*) into l_count from HIST_DATA_COMPARE_TBL;
                    if(l_count=0) then
                            l_err_msg :='No records found';
                    end if;
                END;
        END COMPARE_RECORDS;
                NAME:               INSERT_DATA_TO_TABLE
    DESCRIPTION:               This procedure will insert the records into the target table based based on the data fetched using the sql to run variable.
                                        It also records the commit_after variable which defines that after how many records the insert needs to be committed.
    PROCEDURE INSERT_DATA_TO_TABLE  ( v_target_table VARCHAR2,
                                                                v_sql_to_run   VARCHAR2,
                                                                v_commit_after NUMBER) IS
    v_limit_sql1    VARCHAR2(300) := ' ';
    v_limit_sql2    VARCHAR2(900) := ' ';
    v_plsql_to_run  VARCHAR2(32767);
    BEGIN
            IF NVL(v_commit_after,0) <> 0 THEN
                v_limit_sql1:=  '  LIMIT ' || TO_CHAR(v_commit_after) ;
                v_limit_sql2:=  '   IF MOD(v_number_of_rows, ' || TO_CHAR(v_commit_after) || ' ) = 0 THEN     ' ||
                      '       COMMIT;                                                               ' ||
                      '   END IF;                                                                   ' ;
            END IF;
            v_plsql_to_run:=  '                                                                             ' ||
                      'DECLARE                                                                      ' ||
                      ' v_number_of_rows number:=0;                                                 ' ||
                      '                                                                             ' ||
                      ' TYPE MyType IS REF CURSOR;                                                  ' ||
                      ' CV MyType;                                                                  ' ||
                      ' TYPE RecTyp IS TABLE OF ' || v_target_table || '%ROWTYPE;                   ' ||
                      ' rec RecTyp;                                                                 ' ||
                      '                                                                             ' ||
                      'BEGIN                                                                        ' ||
                      '                                                                             ' ||
                      'OPEN CV FOR                                                                  ' ||
                      '    ' || REPLACE( v_sql_to_run, ';', ' ' )  || ' ;                           ' ||
                      ' LOOP                                                                        ' ||
                      '     FETCH CV BULK COLLECT INTO rec ' || v_limit_sql1 || ';                  ' ||
                      '     FORALL i IN 1..rec.COUNT                                                ' ||
                      '         INSERT /*+ APPEND */ INTO ' || v_target_table || ' VALUES rec(i);   ' ||
                      '         v_number_of_rows  := v_number_of_rows + SQL%ROWCOUNT;               ' ||
                      ' ' || v_limit_sql2 || '                                                      ' ||
                      '     EXIT WHEN CV%NOTFOUND;                                                  ' ||
                      '                                                                             ' ||
                      ' END LOOP;                                                                   ' ||
                      ' COMMIT;                                                                     ' ||
                      ' CLOSE CV;                                                                   ' ||
                      'END;                                                                         ';
            EXECUTE IMMEDIATE v_plsql_to_run;
            COMMIT;
    END INSERT_DATA_TO_TABLE;
    END SECURITY_COMPARE;

  • Oracle Text Help

    Hello Gurus,
    I am new to Oracle Text so i need your valuable inputs in resolving an issue i am facing.
    Here is the table definition and sample data:
    create table test ( a varchar2(100));
    insert into test values('Hello How are you');
    insert into test values('Just to say you Hello');
    insert into test values('I know you');
    insert into test values('you know');
    insert into test values('you may not know me');
    insert into test values('do i know you');
    SQL> SELECT * FROM test;
    A
    Hello How are you
    Just to say you Hello
    I know you
    you know
    you may not know me
    do i know you
    6 rows selected.
    If user enters search criteria ('you know', for example); i need to return all the records having 'you' AND 'know' anywhere. Hence for search criteria 'you know', i should get following records:
    I know you
    you know
    you may not know me
    do i know you
    Similarly, i need to return below records for criteria 'hello you':
    Hello How are you
    Just to say you Hello
    Can Oracle Text help me here?
    Thanks in advance for your help.
    regards,

    SQL>  create table test ( a varchar2(100))
    Table created.
    SQL>  insert into test values('Hello How are you')
    1 row created.
    SQL>  insert into test values('Just to say you Hello')
    1 row created.
    SQL>  insert into test values('I know you')
    1 row created.
    SQL>  insert into test values('you know')
    1 row created.
    SQL>  insert into test values('you may not know me')
    1 row created.
    SQL>  insert into test values('do i know you')
    1 row created.
    SQL>  create index test_idx on test (a) indextype is ctxsys.context
    Index created.
    SQL>  var str varchar2(100)
    SQL>  exec :str := 'you know'
    PL/SQL procedure successfully completed.
    SQL>  select * from test where contains(a,:str) > 0
    A                                                                              
    I know you                                                                     
    you know                                                                       
    you may not know me                                                            
    do i know you                                                                  
    4 rows selected.
    SQL>  exec :str := 'hello you'
    PL/SQL procedure successfully completed.
    SQL>  select * from test where contains(a,:str) > 0
    A                                                                              
    Hello How are you                                                              
    Just to say you Hello                                                          
    2 rows selected.

  • How can I make a text box with 2 columns?

    I can't figure out how to make a text box with two columns. I made one in pages and pasted it into iWeb but it seems to have turned it into an image when I published to a folder. I want to keep it text so the search engines will index it.
    Any suggestions would be greatly appreciated.
    Thanks, David

    You will have to create two text boxes, configure them as columns and then paste into the first and cut where you want the columns to end and paste the remainder into the second column as on this page . I've tried saving a two column Word document as a web page and it just converts it to one column.
    OT

  • Polulate Text frames with XML content - PLEASE help me.

    Hi guys,
    I'm trying to import some xml data to an indesign file. Here are the steps I'm doing:
    1- create new document
    2- create master page
    3- create empty text fields in the master to be tagged
    4- import tags from xml
    5- import xml
    then it simply don't auto populate the text fields wiith the xml content.
    I've already spent about 10 hours trying to figure out what can be the problem...
    My structure in indesign (BEFORE importing XML):
    businesscards
    Card
    employeeName
    employeePosition
    employeeAddressln1
    employeeAddressln2
    employeePhone
    employeeEmail
    My structure in indesign (AFTER importing XML):
    businesscards
    Card <!-- has dropdown arrow with xml content inside -->
    Card <!-- has dropdown arrow with xml content inside -->
    Card <!-- has dropdown arrow with xml content inside -->
    Card <!-- has dropdown arrow with xml content inside -->
    employeeName
    employeePosition
    employeeAddressln1
    employeeAddressln2
    employeePhone
    employeeEmail
    But it doesn't populate the text frames...
    I've already tried to write text in the text frames and tagged them, so I can see those colored brackets. But it doesn't work and makes a mess in the structure.
    Please, can someone help me, do you know a good step by step tutorial online? What am I doing wrong?
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <businesscards>
    <Card>
    <!-- contents of Suzan Reed -->
    <employeeName>Suzan Reed</employeeName>
    <employeePosition>Director of Marketing</employeePosition>
    <employeeAddressln1>506 SE 72nd Avenue</employeeAddressln1>
    <employeeAddressln2>Portland, Oregon 97215</employeeAddressln2>
    <employeePhone>503-481-5858 direct</employeePhone>
    <employeeEmail>[email protected]</employeeEmail>
    </Card>
    <Card>
    <!-- contents of Gabriel Powell -->
    <employeeName>Gabriel Powell</employeeName>
    <employeePosition>Senior Training Director</employeePosition>
    <employeeAddressln1>25 NW 23rd Place, Suite 6-122</employeeAddressln1>
    <employeeAddressln2>Portland, Oregon 97210</employeeAddressln2>
    <employeePhone>503-515-5404 direct</employeePhone>
    <employeeEmail>[email protected]</employeeEmail>
    </Card>
    <Card>
    <!-- contents of Dale Erwing -->
    <employeeName>Dale Erwing</employeeName>
    <employeePosition>Trainer</employeePosition>
    <employeeAddressln1>5131 Buffalo Ave. #20</employeeAddressln1>
    <employeeAddressln2>Sherman Oaks, CA 91423</employeeAddressln2>
    <employeePhone>310-795-8943 cell</employeePhone>
    <employeeEmail>[email protected]</employeeEmail>
    </Card>
    <Card>
    <!-- contents of Jim Conner -->
    <employeeName>Jim Conner</employeeName>
    <employeePosition>Trainer</employeePosition>
    <employeeAddressln1>25 NW 23rd Place, Suite 6-122</employeeAddressln1>
    <employeeAddressln2>Portland, Oregon 97210</employeeAddressln2>
    <employeePhone>503-515-2376 cell</employeePhone>
    <employeeEmail>[email protected]</employeeEmail>
    </Card>
    </businesscards>
    Thanks in advance

    It worked! thanks ... But...
    But only if I don't apply to the Master when I apply to the master all the other cards have the same content as the first of the XML. :(
    Even when I try to create multiple pages (cards) with no Master page (too time consuming), I can't figure out a way of having the other cards filed with the remaining data of the XML. :(
    I don't want to drag the elements one by one to every single card (they are so many...)
    Is there a way of having the structure organized in a way to have indesign auto populate and auto create pages?
    thanks for any kind of advice.

  • Full text search with XML input in Oracle

    Hi,
    I need to develope a web application which can do full text search for a library. We will use XML as the input data format and stored XML file in Oracle. How can I do full text search to the XML according todifferent tags or elements. e.g search from title or from article.
    Do not only convert XML to Ascii and do the full text search. It should utilize the XML tag and structure.
    InterMedia text in 8i or Oracle text in 9i? Or any other toolkit?
    Thanks a lot
    Jack

    Please refer to Oracle Text documentation

  • Need help with XML transformation

    I am not sure this is the right place for this. But i will try it here. I am very troubled with my XSLT. Trying to transform a text Coupon which has the following html for it. So,
    _1. INPUT is:_
    <html>
    <head>
    </head>
    <body>
    <p>
    This coupon is for a good guy whose first name is :
    </p>
    <p>
    </p>
    <p align="center">
    Sadd
    </p>
    <p align="center">
    </p>
    <p align="right">
    <b>also</b> whose <var>full_name</var> is Sadd Hossain
    </p>
    <p align="left">
    </p>
    <p align="left">
    He is a <font size="3">software </font><font size="4">engineer for</font><font size="5">
    S&H</font>
    </p>
    </body>
    </html>
    *2. output needed  is:*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE>
    <TextMSG >
    This coupon is for a good guy whose first name is :
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="center">
    <emph>SADD</emph>
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="right" >
    also whose full_name is Sadd Hossain
    </TextMSG>
    <TextMSG>
    </TextMSG>
    <TextMSG align="left" >
    He is a software engineer
    for S&H
    </TextMSG>
    </POSMESSAGE>
    *3. XSLT for this*
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="body">
    <POSMESSAGE>
    <xsl:for-each select="p">
    <TextMSG>
    <!--xsl:if test="not[@align='']"-->
    <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
    <!--/xsl:if-->
    <xsl:attribute name="font"><xsl:value-of select="@size"/></xsl:attribute>
    <xsl:value-of select="."/>
    </TextMSG>
    <xsl:for-each select="b">
    <emph>
    <xsl:value-of select="."/>
    </emph>
    </xsl:for-each>
    </xsl:for-each>
    </POSMESSAGE>
    </xsl:template>
    </xsl:stylesheet>
    *4: the above xslt generating this output*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE><TextMSG align="" font="">
    This coupon is for a good guy whose first name is :
    </TextMSG><TextMSG align="" font="">
    </TextMSG><TextMSG align="center" font="">
    SADD
    </TextMSG><TextMSG align="center" font="">
    </TextMSG><TextMSG align="right" font="">
    also whose full_name is Sadd Hossain
    </TextMSG><TextMSG align="left" font="">
    </TextMSG><TextMSG align="left" font="">
    He is a software engineer
    for S&H
    </
    *5: Need help with this. what should my xslt look like to get the desired output???????????????*
    any help or direction will be very much appreciated. Thank you_

    I have below suggestions:
    1. Please use code option given in message editor toolbar for posting any formatted content like XML, Java code snippet etc.
    2. replace & in your source XML with _& a m p ;_ (Without spaces, I have put spaces to make it visible here).
    3. I have modified your XSLT according output XML you have given. I am not sure what you want to do with some elements like <b>, <font>, <var> etc. change below XSLT as you require for these elements.
    Modified XSLT:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
            <xsl:output method="xml"/>
         <xsl:template match="body">
              <POSMESSAGE>
                   <xsl:for-each select="p">
                        <TextMSG>
                             <xsl:if test=". != ''">
                                  <xsl:for-each select="@align">
                                       <xsl:attribute name="align">
                                            <xsl:value-of select="."></xsl:value-of>
                                       </xsl:attribute>
                                  </xsl:for-each>
                                  <xsl:value-of select="."/>
                             </xsl:if>
                        </TextMSG>
                   </xsl:for-each>
              </POSMESSAGE>
         </xsl:template>
    </xsl:stylesheet>
    OUTPUT:
    <?xml version="1.0"?>
    <POSMESSAGE>
         <TextMSG>This coupon is for a good guy whose first name is :</TextMSG>
         <TextMSG/>
         <TextMSG align="center">Sadd</TextMSG>
         <TextMSG/>
         <TextMSG align="right">alsowhose full_name is Sadd Hossain</TextMSG>
         <TextMSG/>
         <TextMSG align="left">He is a softwareengineer forS&H</TextMSG>
    </POSMESSAGE>

  • Help with XML - AS 3.0

    Hello everybody. I decided to start working with XML since it allows me to load assets externally and edit my applications later very easily without having to edit the fla file itself. So today I watched and read a few tutorials and now I'm trying to build an Event Scroll, all through XML and AS 3.0 code. Basically what I want is to have several events inside a movieclip which I will incorporate into a scroll pane when I'm done, for now I'll focus on extracting data from the XML file and parsing it with AS 3.0. The layout is simple: a thumbnail image on the left, and beside it on the right there is the title of the event, its date and some info about it and all of these should have a dark grey background while the text is in white. Each two events are 30 pixels apart and there are 5 events for now.
    Ok enough talking now let's get to the code:
    XML Code:
    <?xml version="1.0" encoding="utf-8"?>
    <EVENTSXML>
         <EVENT>
              <TITLE> Event 1</TITLE>
             <DATE>12/04/2009</DATE>
            <THUMB>thumb0.jpg</THUMB>
            <INFO> Some Text Goes Here </INFO>
        </EVENT>
         <EVENT>
               <TITLE>Event 2</TITLE>
             <DATE>03/02/2009</DATE>
            <THUMB>thumb1.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 3</TITLE>
             <DATE>18/11/2008</DATE>
            <THUMB>thumb2.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 4</TITLE>
             <DATE>10/09/2008</DATE>
            <THUMB>thumb3.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 5</TITLE>
             <DATE>06/08/2008</DATE>
            <THUMB>thumb4.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
    </EVENTSXML>
    Actionscript 3.0 Code:
    var myXML:XML;
    var req:URLRequest = new URLRequest("events.xml");
    var ldr:URLLoader = new URLLoader();
    ldr.load(req);
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
         myXML = new XML(e.target.data);
         buildEvents(myXML.EVENT);
    var eventScroll:MovieClip = new MovieClip();
    var padding:Number = 30;
    this.addChild(eventScroll);
    eventScroll.x = eventScroll.y = padding;
    function buildEvents(evnts:XMLList):void
         for(var i:uint = 0; i <evnts.length(); i++) {
              var eventData:MovieClip = new MovieClip();
              eventData.y = (20 + padding) * i;
              eventData.itemNum = i;
              eventData.title = evnts[i].TITLE;
              eventData.date = evnts[i].DATE;
              eventData.thumb = evnts[i].THUMB;
              eventData.info = evnts[i].INFO;
              // thumb container
              thisThumb:Sprite = new Sprite();
              var ldr:Loader = new Loader()
              var req:URLRequest = new URLRequest(eventData.thumb);
              ldr.load(req);
              thisThumb.addChild(ldr);
              eventData.addChild(thisThumb);
              eventScroll.addChild(eventData);
    now I am stuck there... the application is not done yet and when I publish the file I keep getting errors, these are the errors:
    1067: Implicit coercion of a value of type flash.display:Sprite to an unrelated type Class.
    Source: thisThumb:Sprite = new Sprite();
    1188: Illegal assignment to class Sprite.
    Source: thisThumb:Sprite = new Sprite();
    1120: Access of undefined property thisThumb.
    Source: thisThumb.addChild(ldr);
    1120: Access of undefined property thisThumb.
    Source: eventData.addChild(thisThumb);
    1119: Access of possibly undefined property contentLoaderInfo through a reference with static type flash.net:URLLoader.
    Source: ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
    So where did I go wrong and how can I carry on with my code to finish my application?
    P.S: I do not want someone to do it for me, so in case someone decided to help me out, please comment and explain your code because this application is for learning porpuses in the first place... Thanks in advance!

    oh I've just noticed one little problem, in my info field, the text doesn't break and start a new line, it just keeps going horizontally although I've set it to multiline and gave it a width and height... so what shall I do to fix this problem? here's the code:
    var infoF:TextField = new TextField();
              infoF.text = eventData.info;
              infoF.x = 250;
              infoF.y = dateF.y + padding;
              infoF.multiline = true;
              infoF.width = 200;
              infoF.height = 100;
              addChild(infoF);

  • Oracle Text - Problem with filtering binary documents (.doc, .pdf, etc...)

    Hi, I have a problem with filtering binary documents (.doc, .pdf, etc...). I use SQL*PLUS for remote access to Oracle 10.2 on Linux and I create table:
    CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    I insert to this table:
    INSERT into test values(1, 'PATH/text1.doc‘);
    INSERT into test values(2,'PATH/text2.doc‘);
    and then:
    CREATE INDEX test_index ON test(text) indextype is ctxsys.context
    parameters (’datastore ctxsys.file_datastore
    filter ctxsys.auto_filter’);
    Message "Index created" is displayed, but objects: DR$test_index$I, DR$test_index$K, DR$test_index$N, DR$test_index$R and DR$test_index$P are empty => index wasn´t created probably.
    I don´t know, where is bug, either bug is somewhere in this code or on the server (wrong installation oracle or constraint privileges). Do you know in what is bug?

    The following is an excerpt from the 10g online documentation. Note the items that I have put in bold.
    "FILE_DATASTORE
    The FILE_DATASTORE type is used for text stored in files accessed through the local file system.
    Note:
    FILE_DATASTORE may not work with certain types of remote mounted file systems.
    FILE_DATASTORE has the following attribute(s):
    Table 2-4 FILE_DATASTORE Attributes
    Attribute Attribute Value
    path path1:path2:pathn
    path
    Specify the full directory path name of the files stored externally in a file system. When you specify the full directory path as such, you need only include file names in your text column.
    You can specify multiple paths for path, with each path separated by a colon (:) on UNIX and semicolon(;) on Windows. File names are stored in the text column in the text table.
    If you do not specify a path for external files with this attribute, Oracle Text requires that the path be included in the file names stored in the text column.
    PATH Attribute Limitations
    The PATH attribute has the following limitations:
    If you specify a PATH attribute, you can only use a simple filename in the indexed column. You cannot combine the PATH attribute with a path as part of the filename. If the files exist in multiple folders or directories, you must leave the PATH attribute unset, and include the full file name, with PATH, in the indexed column.
    On Windows systems, the files must be located on a local drive. They cannot be on a remote drive, whether the remote drive is mapped to a local drive letter."
    With accessible paths and files, you get something like:
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(1,'c:\oracle11g\banana.pdf');
    1 row created.
    SCOTT@orcl_11g> INSERT into test values(2,'c:\oracle11g\cranberry.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
           608
    SCOTT@orcl_11g> In the following, I used a non-existent path and non-existent file name, which produces the same results as when you use a remote path that does not exist locally.
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(3,'c:\nosuchpath\nosuchfile.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
             0
    SCOTT@orcl_11g>

  • Oracle SQL HELP with convert GMT to EST and DST and Date offset

    Hi, I have a query that does not seem to work trying to convert a date field that is in GMT to est and using extract(timezone_hour FROM TO_TIMESTAMP_TZ as an offsetr
    HEre is my sql
    dtl.start_dt_gmt + (extract(timezone_hour FROM TO_TIMESTAMP_TZ( dtl.start_dt_gmt,'DD-MON-YYYY HH24:MI:SS TZH:TZM'))/24 ) START_DT_Local
    If the date (dtl.start_dt_gmt) is may 1 and gmt starts at 04:00 AM , the extract offset produces -4
    However, if the date (dtl.start_dt_gmt) is Feb 1 which begins at 05:00 AM GMT, the date offset still gives 04. What am i doing wrong? Any help would be appreciated. Thanks.
    Saul

    If your data is not associated with timezone then you'll have to use something like
    case when dt between A and B then dt-1/24 else dt end; <-- This will give you 1 hour back of EDT. So, as far as concern at database level, it is nothing to do at db level, because db is used by application, so you need to code in the app.
    Oracle never actually changes a TIMEZONE column value when you set your system to be on daylight savings time. There are several built-in DST DATE conversion functions for changing to daylight savings time:
    current_date
    current_timestamp
    localtimestamp
    dbtimezone
    sessiontimezone
    extract
    from_tz
    to_timestamp
    to_timestamp_tz
    to_yminterval tz_offset
    http://dba-oracle.com/t_oracle_daylight_saving_time_dst_date_conversion.htm
    Regards
    Girish Sharma

Maybe you are looking for

  • Can I have TWO Extractors for ONE InfoObject ???

    Hi all,     We have two extractors (Business Content & Generic Extractor for 0WBS_ELEMT_ATTR). Can we have these TWO extractors for 0WBS_ELEMT InfoObject. If yes, can I have the procedure, PLEASE ? Thanks.

  • How to tell if ObjectProxy contains ArrayCollection or single object?

    When I get data back from a web service, the list contains an ArrayCollection. Within each ArrayCollection, the item may be either a single object, or an ArrayCollection of theser objects. It appears FLEX supplies what it thinks is the correct type o

  • Installing Oracle Database and SQL Developer

    Hi, I was looking for some help/advice in regards to installing an Oracle Database and SQL Developer onto a Windows 7 32bit machine. I have been asked to create a database to store data that I create through reports in Excel so I am required to creat

  • EUP Personalizaion - Delete/Lock/Unlock account

    Hi, I have followed a couple of links herein over EUP personalization, but didn't find the solutions on one scenario: If I am going to raise the request for Delete/Lock/Unlock account then there is no need to have the tabs: Risk violation and custom

  • Jinitiator and IE 7

    Hi, I've tried searching through support notices and documentation and am thoroughly confused. Does anyone know what the current state of play regarding JVM support on IE 7 is? We are currently still running a third party app using client server form