Preload DB tables into Coherence Cache using HibernateDataStore

Hi,
I am trying to use Hibernate just to pre-load my database tables [reference data with millions of rows] into coherence cache [as pojos]. I started looking at the configuration file from the below link -
http://coherence.oracle.com/display/COH35UG/Using+Hibernate+as+a+CacheStore+for+Coherence
and could not grab much from there.
Can someone plz provide clean steps on how i can use hibernate to pre-load my database tables into coherence. An example with pojo would be very helpful?
Thank You,
Jagadeesh.

Hi, Steve
Thanks for the information. I did look at the document regarding CacheLoader and read-through and read-ahead.
I have the question based on the above info.
1. Currently I am using Built-in CacheStore implementation: JPA CacheStore.
Here is the configuration in persistance.xml.
<backing-map-scheme>
<read-write-backing-map-scheme>
<!--
Define the cache scheme
-->
<internal-cache-scheme>
<local-scheme/>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>com.tangosol.coherence.jpa.JpaCacheStore</class-name>
<init-params>
JpaCacheStore extends JpaCacheLoader and implments CacheStore interface.
so in JpaCacheLoader, it has load and loadAll method implementation.
Can I confirm in my case, i shouldn't do anything else regarding the read-through?
Cheers
Julia

Similar Messages

  • How I load all the data in a database table into a cache?

    Hi
    Lets assume I have a lookup table I want to load it upfront into the cache so that the application can use this data from cache. One way is to write code to create a map from the database and call putALL. Is there any better approach to this?
    Another thing is if the data is more than 1 GB and if I construct a map of one GB before putting it into the cache the JVM might crash. The question is how do I distribute upront loading of the cache to multiple JVMs. Do I have to use invocation service or is there any thing out of box.

    I only use one JVMs and I use a distributed cache, the configuration XML file like this:
    <p> <distributed-scheme>
    <scheme-name>default-distributed</scheme-name>
    <service-name>DistributedCachestore</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <scheme-ref>example-read-write</scheme-ref>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
         <listener-scheme> </listener-scheme> 
         <autostart>true</autostart>
    </distributed-scheme>
    <read-write-backing-map-scheme>
    <scheme-name>example-read-write</scheme-name>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-ref>default-eviction</scheme-ref>
    <high-units>50050</high-units>
    <low-units>40000</low-units>
    <expiry-delay>3600</expiry-delay> 
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <scheme-ref>example-cachestore</scheme-ref>
    </class-scheme>
    </cachestore-scheme>
    <read-only>false</read-only>
    <write-delay-seconds>0</write-delay-seconds>
    </read-write-backing-map-scheme>
    <!-- 
    CacheStore test definition 
    -->
    <class-scheme>
    <scheme-name>example-cachestore</scheme-name>
    <class-name>com.tangosol.examples.coherence.DBCrudStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>cachec</param-value>
    </init-param>
    </init-params>
    </class-scheme></p>
    The data in my table will reach about 1000000+ and I want to load about 50000 into cache.
    Thanks.

  • How to pre-load Coherence Caches used within an OEP Application

    Hi OEP/Coherence guys,
    I'm currently developing an OEP application that was consuming database inputs in CQL queries.
    I've replaced database direct access by Coherence caches access. My Coherence Local caches use a cache loader to fetch rows (by key) when there is a cache miss. This is working well, and the caches get filled in during the execution of my OEP application.
    The problem is that if CQL queries are made on some attributes (not the key) of not-yet-cached data, the load method of my cache loader is not invoked and there is no result to my CQL query.
    I'm wondering how to pre-load my data in Coherence Caches, from the database, when the OEP application starts to avoid such kind of problems...
    Thx for any advice.
    Renato

    Hi.
    Could you please describe the way to "set-up a cache-loader to load data into your cache when the OEP application starts" ?
    I have a cache-loader configured with my cache. My cache-loader implements the "com.tangosol.net.cache.CacheLoader" interface.
    This interface only defines 2 methods:
    load(java.lang.Object oKey) ==> Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.
    loadAll(java.util.Collection colKeys) ==> Return the values associated with each the specified keys in the passed collection.
    None of these methods allows me to pre-load my data (and BTW it looks like "loadAll" is never called by OEP)
    Thx
    RP

  • How to bring Picture from OHEM table into Crystal Report using query

    Hi expert
    i had a query and which is attached to a crystal report, and its working fine,
    the thing what i need is to bring the picture which is stored in OHEM table, (Employee Photo)
    to the report. in the query i had attache the picture field. but not able to see it over the Crystal reprot
    The below given is the query
    select OHEM.empID,isnull(OHEM.firstName,'')+' ' +isnull(OHEM.middleName,'')+ ' '+isnull(OHEM.lastName,'')AS [Employee Name],
    OHPS.name AS [Position],OUDP.Name AS [Department],OUBR.Name AS[Branch],OHEM.U_SponsName,OHEM.U_EMPOLD_ID,OCRY.Name AS [Nationality],
    OHEM.U_JoinDate As [Joining Date (G)],OHEM.U_JoinDateH As [Joining Date (H)],OHEM.birthDate, (CAST(DATEDIFF(day,OHEM.birthDate,GETDATE())/(365) AS int)) As [AGE],(CAST(DATEDIFF(day,OHEM.startDate,GETDATE())/(365) AS int)) As [Year],
    OHEM.startDate As [Emp Contract Start Date (G)],OHEM.U_CEDate As [Emp Contract End Date (G)],OHEM.U_ConType As [Emp Contract Type],
    OHEM.U_ContDur AS [Emp Contrat Duration],OHEM.U_CRDate As [Emp Cont Renewal Date (G)],OHEM.U_IQId AS [Iqama ID],OHEM.U_IQIsDate As [Iq Issue Date (G)],
    OHEM.U_IQExDate As [Iq Expiry Date (G)],OHEM.U_IQIsDateH As [Iq Issue Date (H)],OHEM.U_IQExDateH As [Iq Expiry Date (H)],OHEM.U_InsType As [Insurance Type],
    OHEM.U_InsExpDate AS [Insurance Exp Date],OHEM.U_InsName As [Insurance Company],OHEM.U_DestiCity As [Destination City],
    OHEM.U_TicketType As[Ticket Type],OHEM.U_TicketClass As [ Ticket Class], OHEM.U_TravelDate As [Travel Date],OHEM.passportNo,OHEM.U_PassportIsDate AS [Passport Issue Date],
    OHEM.passportEx AS [Passport Expiry Date],OHEM.U_BSal As [Basic Salary], OHEM.U_HoAllow As [House Allowance],OHEM.U_TrAllow As [Transport Allowance],
    OHEM.U_FoodAllow AS [Food Allowance],OHEM.U_CarAllow AS [Car Allowance],OHEM.U_OthAllow As [Other Allowance],OHEM.U_BonusAllow As [Bonus],
    OHEM.U_VacStartDate1 AS [First Vacation Start Date], OHEM.U_VacEndDate As[ First Vacation End Date],OHEM.U_VacResDate As [First Vacation Resume Date],
    OHEM.U_VacDur AS [First Vacation Duration],OHEM.U_VacStartDate2 As [Second Vacation Start Date],OHEM.U_VacEndtDate2 AS [Second Vacation End Date],
    OHEM.U_VacDur2 As [Second Vacation Duration],OHEM.U_VacResDate2 AS [Second Vacation Resume],OHEM.U_VacStartDate3 AS [Third Vacation Start Date], OHEM.U_VacEndtDate3 As[ Third Vacation End Date],
    OHEM.U_VacRestDate3 As [Third Vacation Resume Date],OHEM.U_VacDur3 AS [Third Vacation Duration],OHEM.U_VacStartDate4 AS [Fourth Vacation Start Date],
    OHEM.U_VacEndDate4 As[ Fourth Vacation End Date],OHEM.U_VacResumeDate As [Fourth Vacation Resume Date],
    OHEM.U_VacDur4 AS [Fourth Vacation Duration],OHEM.U_VisaDuration AS [Visa Duration],OHEM.U_VisaStartDate AS [Visa Start Date],
    OHEM.U_VisaEndDate AS [Visa End Date],OHEM.U_VisaType As [Visa Type],OHEM.picture,OHEM.remark,OHEM.attachment,OHEM.mobile AS [Mobile],OHEM.homeTel AS [Residence Tele],OHEM.email AS [E-Mail] from OHEM
    left outer join OHPS ON OHEM.position=OHPS.posID
    left outer Join OUDP on OHEM.dept=OUDP.Code
    left outer join OUBR on OHEM.branch=OUBR.Code
    left outer join OCRY on OHEM.citizenshp=OCRY.Code
    Pls suggest how to make it appear the photo in the crystal report
    regards

    Hi,
    Please refer this how to guide which may give some idea for creation formula:
    http://www.pioneerb1.com/wp-content/uploads/2012/04/How-to-work-with-Crystal-Reports-8.8.pdf
    Thanks & Regards,
    Nagarajan

  • Import data from Oracle table into flat file

    How to import the data in the oracle table into flat file using UTL File of PL/SQL....
    I am new in PL/SQL..
    can someone help me in writing query?

    Note : Not Tested.
    DECLARE
    V1 VARCHAR2(32767);
    F1 UTL_FILE.FILE_TYPE;
    cursor c1 is select ename,empno from emp;
    r_c1 c1%rowtype;
    BEGIN
    -- In this example MAX_LINESIZE is less than GET_LINE's length request
    -- so the number of bytes returned will be 256 or less if a line terminator is seen.
    open c1;
    F1 := UTL_FILE.FOPEN('MYDIR','MYFILE','W',256);
    loop
    fetch c1 into r_c1;
    v1:= r_c1.ename||''||To_char(r_c1.empno);
    UTL_FILE.PUT_LINE (F1, v1,TRUE);
    v1:= null;
    Exit when c1%not found;
    end loop;
    UTL_FILE.FCLOSE(F1);
    END;
    http://download.oracle.com/docs/cd/B19306_01/appdev.102
    ------------------------------------------------------------------

  • How to paste a Word table into email without showing the guidelines.

    When I paste a Word table into an email using Explorer, the guidelines don't show. When I paste into an email while using Firefox, the lines show. I don't want the guidelines to show.

    BigEnd wrote:
    When pasted from Word, the graphics are Inline by default.  You can correct each one by selecting the graphic and then Anchored Object, Options and selecting Above Line (centered etc).  What I do then is create an object style to these specs and this makes it quicker to apply to the graphics.
    You say that there are very many graphics in the doc - does anyone know how to make the above settings the default when graphics are pasted from Word?
    M
    Thank you M, but I believe I figured it out:
    I made styles in Word to make things a bit simpler when changing large sections of text, so within the settings of the images style select Format>Paragraph>Line and Page Breaks. Under 'Textbox Options' the Tight wrap defaults to 'None' - Select 'All'.
    When the file is placed into InDesign, the images don't overlap, and are exactly where they need to be.

  • How do we put an object in coherence cache when the pk is using @TableGener

    Hi,
    I am trying to create a sample application using Spring, JPA, Eclipselink, Coherence. I am trying to insert objects into cache and then expecting it to persist into database asynchronously. The issue is we are using @TableGenerator to generate pk. I dont have the primary key before hand to use it to put the object into the cache.
    Ex: cache.put(???, object);
    What is the best approach in such scenarios. Can anyone point me to an example?
    Thanks.

    user12107940 wrote:
    The above article helps but we can't change the current architecture of generating the primary key i.e., TableGenerator. We have other non-java processes that update the database. Is there any other way to use jpa-eclipselink to know the pk before persisting the object.In this case you have to ensure that anything which comes via Coherence gets ids from a set of possible ids which is distinct from the set of possible ids generated in the database, but it is technically impossible to put something in a cache without an id already generated if the id is part of the primary key (and you want it to be).
    E.g. whatever generates ids in the database must only generate odd numbers for ids (e.g. a sequence which increases not with one but with two), and whatever goes via JPA/EclipseLink must only generate even numbers.
    Best regards,
    Robert

  • Why I need the same pof conf on client+srver if Coherence is used as cache?

    Hi,
    I have first defined my own pof-config.xml only on my client.
    And Coherence wrote me a very ackward msg: "StreamCorruptedException unknown user type 6" !!!????
    I have made another try, while defining my own pof-config.xml on my servers too !
    Then, Coherence has worked smoothly, as expected.
    QUESTION: as I use Coherence as a cache, using no index, no EP... I expect Coherence is not going to dig into my byte[] for the 'server' nodes.
    Then, I expect only the clients have to serialize/deserialize, I expect they send the byte[], and the servers store only them, that is, without needing any pof config.
    If it works as I have written, why Coherence is not working ("StreamCorruptedException unknown user type 6"), if I define my own pof-config.xml only on my client ?
    Thanks.
    Regards,
    Dominique

    Hi Dominique,
    user4947403 wrote:
    Hi Robert,
    robvarga wrote:
    Hi Dominique,
    Coherence does not know what you will do with the data. It has to assume that you may want to send an entry-processor or entry aggregator or query the items with a filter, or you may simply want to get the item from the cache WITHIN the cluster not only via Extend. imho, I feel it as counter-intuitive.
    I have expected something like: as far as no EP is run, no pof config is searched+if no pof config exists in order to deserialize when needed, raise an exception.
    1. There is no such thing as no config. If you don't specify an explicit configuration, default configuration is used, which (depending on whether POF is globally enabled or not) is either a DefaultSerializer, or a ConfigurablePofContext loading stuff from pof-config.xml.
    2. If some data travels across the proxy connection, it has to travel in the serialization format configured for the proxy service. If you put data into a cache, it has to travel on the network in the serialization format configured for the cache service of the cache. Period.
    If this rule was not followed, Coherence would not know what serialization format any piece of data has. Therefore as mentioned below, if the proxy service serialization configuration differs from the cache service serialization configuration, data has to be de- and reserialized on the proxy.
    Again, imagine the case if your logic were followed: Just because you used some service to put data into the cache, Coherence cannot know that you will use the same service to get the data back. If some code inside the cluster tried to deserialize it, it would fail as it has no idea, that it was serialized with the proxy serialization format. It actually doesn't even have an idea that the data came from the proxy, or even that there is a proxy. Also, if you used some other code to put data into the cache which is not coming via the proxy, you would have another piece of data sitting in the cache which was not serialized by the proxy serialization format. If you tried to retrieve that via the TCP*Extend, you could not deserialize it on the client as it is not in the serialization format used by the proxy. Moreover, the client does not even have any chance of even knowing what it was serialized with as the client does not even see the serialization configuration of services inside the cluster.
    Because of this it has to ensure that it can deserialize it with the serializer configured for the cache service within the cluster, so not with the one used for TCP*Extend.Well, in my case, my client is a cluster node+localstorage=false => are the explanations you wrote ok for this case too ?
    It does not matter how your cluster looks like at the moment when you consider consistency checks. Nothing prevents you to start another cluster node, therefore Coherence cannot be lenient in the service configuration consistency checks just before .
    By the way, if you have only a single storage-disabled cluster node (and that means that no cache server node is running) and you tried to put something into a distributed cache then if the serialization error did not happen because you have correct configuration, then you would have received a Storage not configured error instead, as no cache server node is running to actually store your data.
    So if you did not get any errors, then you were either putting the data into a replicated cache where being storage-disabled is not relevant as that is a distributed cache setting, or you had a cache server node running or you only believed that the node was storage disabled.
    Best regards,
    Robert

  • Inserting data from one table into another table using PL/SQL

    HI,
    I am trying to insert values from one table into another using PL procedure, the values I want to retrieve from the table riverside1 are charac_id and charac_type and insert these values into another table called riverside2 , the stored procedure zorgs_gorfs(x,y) accepts two parameters which are 2 charac_id's of d characters in riverside1 then using insert statements inserts these characters from riverside1 into riverside2.
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (x);
    INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (y);
          END zorgs_gorfs;
    /This works but the problem im having is that when I also try to insert the charac_type as well as the charac_id it doesnt work below is the code:
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);
          END zorgs_gorfs;
    /can someone kindly sort me out

    modify this sql
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);as
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id in ( x,y));But my suggestion would be consider revising your approach. It does not look that good.
    Thanks,
    karthick.

  • Insert data into table from JSP page using Entity Beans(EJB 3.0)

    I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
    1. I have a table 'FRIENDS', (in Oracle 10g database).
    2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
    3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
    4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
    5. I am using JDev as editor.
    Please provide me code ASAP or link with similar example.
    Thank you.
    Anurag

    Hi,
    I am also trying that scenario. So u can
    Post the jsp form data to a Servlet which will act as a Controller.
    In the servlet invoke the business method.
    Similar kind of app is in www.roseindia.net
    Hope this would help u.
    Meanwhile if u get any optimal solution, pls post it.
    Thanks,
    Happy Java Coding.

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • Loading metadata into EPMA applications using Interface tables-Automation

    Hi,
    I am loading the metadata into epma applications using interface tables as ODI dont perit to load metadata into epma applications. Is there any way of using ODI and interface tables together to load the metadata
    This process also need to be automated.

    Hi,
    It is certainly possible and has be done, though there is not anything available that will do it for you, you will have to put in some effort learning the structure of the interface tables, then build interfaces and then a package in ODI to streamline the process.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Pass Pl/sql table into USING clause in EXECUTE IMMEDIATE statment

    Getting error when I try to pass the PL/SQL table into USING clause in EXECUTE IMMEDIATE statment:
    Declare
    result NUMBER;
    TYPE values_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    lv_tab values_tab;
    lv_exp varchar2(300);
    lv_exec varchar2(300);
    BEGIN
    lv_tab(1) := 5;
    lv_tab(2) := 48;
    lv_tab(3) := 7;
    lv_tab(4) := 6;
    lv_exp := ':b1+:b2+(:b3*:b4)';
    lv_exec := 'SELECT '||lv_exp ||' FROM DUAL';
    EXECUTE IMMEDIATE
    lv_exec
    INTO
    result
    USING
    lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    Error at line 1
    ORA-06550: line 20, column 12:
    PLS-00457: expressions have to be of SQL types
    ORA-06550: line 15, column 8:
    PL/SQL: Statement ignored
    I am trying to evaluate the expression ":b1+:b2+(:b3*:b4)" which is stored in table. This table has different expressions (around 300 expressions). I want to use the bind variables in expression because each expression evaluated thousand of time may be more in some case. If I don't use bind variable then it fill shared pool.
    Is there any way I can pass the USING (IN) parameters dynamically instead of writing "USING lv_tab(1), lv_tab(2), lv_tab(3), lv_tab(4)"? As number of input parameters change depend on the expression in the table.
    If not possible please suggest any other ideas/approches
    Please help..
    Edited by: satnam on Jun 11, 2009 11:50 AM

    Well, you keep changing reqs faster I can keep up. Anyway, assuming N-th bind variable (left-to-right) corresponds to collection N-th element:
    Declare
        result NUMBER;
        lv_tab values_tab := values_tab();
        lv_exp varchar2(300);
        lv_exec varchar2(300);
        lv_i number := 0;
    BEGIN
        lv_tab.extend(4);
        lv_tab(1) := 5;
        lv_tab(2) := 48;
        lv_tab(3) := 7;
        lv_tab(4) := 6;
        lv_exp := ':5000135+:5403456+(:5900111*:5200456)';
        lv_exec := lv_exp;
        While regexp_like(lv_exec,':\d+') loop
          lv_i := lv_i + 1;
          lv_exec := REGEXP_REPLACE(lv_exec,':\d+',':b(' || lv_i || ')',1,1);
        end loop;
        lv_exec := 'BEGIN :a := ' || lv_exec || '; END;';
    DBMS_OUTPUT.PUT_LINE(lv_exec);
    EXECUTE IMMEDIATE lv_exec USING OUT result,IN lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    BEGIN :a := :b(1)+:b(2)+(:b(3)*:b(4)); END;
    95
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to join THREE different tables into internal table using one select statement .

    How to join THREE different tables into internal table using one select statement .
    Hi experts,
    I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
    Scenario:
    Database tables:
    SPFLI
    SFLIGHT
    SBOOK.
    Table Fields:
    SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
    SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
    SEATSOCC_C SEATSMAX_F SEATSOCC_F
    SBOOK - CARRID CONNID CLASS
    MY INTERNAL TABLE IS IT_XX.
    Your help much appreciated.
    Thanks in advance.
    Pawan.

    Hi Pawan,
    please check below codes. hope it can help you.
    TYPES: BEGIN OF ty_xx,
            carrid     TYPE spfli-carrid   ,
            connid     TYPE spfli-connid   ,
            countryfr  TYPE spfli-countryfr,
            cityfrom   TYPE spfli-cityfrom  ,
            countryto  TYPE spfli-countryto,
            cityto     TYPE spfli-cityto   ,
            fldate     TYPE sflight-fldate ,
            seatsmax   TYPE sflight-seatsmax ,
            seatsocc   TYPE sflight-seatsocc ,
            seatsmax_b TYPE sflight-seatsmax_b,
            seatsocc_b TYPE sflight-seatsocc_b,
            seatsmax_f TYPE sflight-seatsmax_f,
            seatsocc_f TYPE sflight-seatsocc_f,
            class      TYPE sbook-class,
          END OF ty_xx,
          t_xx TYPE STANDARD TABLE OF ty_xx.
    DATA: it_xx TYPE t_xx.
    SELECT spfli~carrid
           spfli~connid
           spfli~countryfr
           spfli~cityfrom
           spfli~countryto
           spfli~cityto
           sflight~fldate
           sflight~seatsmax
           sflight~seatsocc
           sflight~seatsmax_b
           sflight~seatsocc_b
           sflight~seatsmax_f
           sflight~seatsocc_f
           sbook~class
      INTO TABLE it_xx
      FROM spfli INNER JOIN sflight
      ON spfli~carrid = sflight~carrid
      AND spfli~connid = sflight~connid
      INNER JOIN sbook
      ON spfli~carrid = sbook~carrid
      AND spfli~connid = sbook~connid.
    Thanks,
    Yawa

  • How to Seed Cache using Event Polling Table

    Hello Experts
    I Have configured Event Polling Table in my PC
    Steps :
    1) Created table using SAEPT.Oracle.sql schema in 10g
    2) Imported SAEPT.Oracle.sql by creating an new connection pool in Physical Layer
    3) Configured in Repository - Tools - Utilities - OBI Event Polling Tables by selecting SAEPT.Oracle.sql and gave 15 min in polling frequency
    4) Inserted some data in SAEPT.Oracle.sql
    5) Checked NQserver.log after the polling time which is 15 min . NQserver.log was not getting updated or has any details about the event occurred .
    Do you guys think i have missed some step in configuring EPT , if so ..please help me out i need to implement on client machine soon.
    Appreciate your time guys .
    Edited by: newbi on Jul 1, 2010 10:34 AM

    As far as i know event polling tables are used to purge the cache automatically. It is not used to seed the cache.
    If you want to seed the cache, use ibots or you have to do it as a program..
    Edited by: user8000915 on Jul 1, 2010 7:37 AM

Maybe you are looking for