Doubt on using trunc()

Hi,
I need some clarification over using trunc().
I came across something where I need to pick only month and day from the date column where the format is YYYYMMDD. Can anyone please tell me how to use that and whether any better functions to use than the trunc. And I need to compare that against some date.
like- Suppose if the month and day of my date is between april 3rd and october 30 i need to add one hour otherwise the date should be the same..Could anyone pls help me in this regard??!!
Thanks in advance,
GK

sql>select dt,
  2         dt + case when to_char(dt, 'mm/dd') between '04/03' and '10/30' then (1/24) else 0 end new_dt
  3    from t
  4   order by dt;
DT                    NEW_DT
02/14/2006 08:30:00am 02/14/2006 08:30:00am
04/01/2006 04:00:00pm 04/01/2006 04:00:00pm
04/15/2006 10:00:00am 04/15/2006 11:00:00am
07/04/2006 06:00:00pm 07/04/2006 07:00:00pm
11/10/2006 09:00:00pm 11/10/2006 09:00:00pm

Similar Messages

  • Can we use Trunc,Substr in Excel templates

    Hi All,
    I have a date xml tag with value like "2012/04/01 00:00:00" i need to show this in excel output as "01-APR-2012".
    I am using Excel template, need your help to achieve the same.
    I tired to use Trunc,Substr,Format date but nothing is working.
    Please give me your valuable inputs to solve this issue.
    Thanks
    Rajehs

    Varma,
    Thanks for the reply, i have already checked the link but it doesn't have syntax to use Trunc,substr etc. functions.
    Also date in example is - "1996-02-03T00:00:00.000-07:00" , but in my case date format is different "2012/01/01 00:00:00".
    Thanks
    Rajesh

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • Using TRUNC in timestamps

    Sir,
    As you know we were using TRUNC function in DATE datatype. But I want to use it with TIMESTAMP datatypes. For example:
    select trunc(systimestamp,'hh24:mi:ss') from dual;
    The main idea to get some part of given timestamp without using type conversions (i.e. TO_CHAR).
    Note that this is useful when you want to ADD or Subtract the time side from timestamp with interval values and comparing them to another timestamps fields or values.
    Thank you in advance.

    Trunc is not working in 9i
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> SELECT current_timestamp - TRUNC (current_timestamp) time
    2 FROM dual
    3 /
    SELECT current_timestamp - TRUNC (current_timestamp) time
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
    SQL>
    But in 10g...
    Personal Oracle Database 10g Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> SELECT current_timestamp - TRUNC (current_timestamp) time
    2 FROM dual;
    TIME
    +000000000 14:53:04.941000
    SQL>
    Why?

  • Using trunc(add_months(sysdate, 1 * -12) getting the monday on that wk

    Dear all;
    I am using trunc(add_months(sysdate, 1 * -12)), which get me 05/18/2010 however what I would like to do is bascially if that date doesnt fall on a monday then get the monday associated with it in that period, so in this case the monday associated with it is 05/17/2010. how do I modify that to get what i want.
    Edited by: user13328581 on May 18, 2011 8:36 AM

    SQL> select trunc(add_months(sysdate, 1 * -12),'IW') from dual
      2  /
    TRUNC(ADD
    17-MAY-10
    SQL> OR:
    SQL> select next_day(trunc(add_months(sysdate, 1 * -12)) - 7,'monday') from dual
      2  /
    NEXT_DAY(
    17-MAY-10
    SQL> SY.

  • Doubt about using automation testing in mtm and vs 2012

    Hi
    Ive a doubt in using mtm and vs 2012. I wanna test a software by automation method
    1) whether i should record the steps in visual studio and attach the recorded file to mtm and test
    or
    2) can i record the script(steps) in mtm and run the automation testing in mtm, if you say yes what are the step.
    Plz help me out for both 1 and 2 by tell the steps.
    Thank you
    Reguards
    Pavan kumar R 

    Hi Pavan,
    It is based on the detail requirement to choose them.
    Do Coded UI test in visual studio 2012, we could record the action and playback, link tests to test case that in MTM, we also could base on the detail requirement to modify the code.
    Do manual or automated test in MTM 2012, we also could record the action and playback, but can’t modify the code (need do it in vs), we could do automated tests in lab environment
    # System Testing Your Application Using Microsoft Test Manager
    http://msdn.microsoft.com/en-us/library/jj635157(v=vs.110).aspx
    For the automated test in MTM, you could refer to these steps below:
    Create tests
    Check in TFS
    Link test methods to test case
    Queue a build
    Create lab environment in mtm
    Do automated test
    More information, please refer to:
    # Essential Guide for Running Automated Tests from a Test Plan
    http://msdn.microsoft.com/en-us/library/ff472576(v=vs.110).aspx
    If we record the action (script/steps) in the MTM, we could
    playback the test, if we want do the automated test for that recording, we could generate the code in VS and link that test to the test case, after that we could do automated tests.
    # Generating a Coded UI Test from an Existing Action Recording
    http://msdn.microsoft.com/en-in/library/dd286652(v=vs.110).aspx
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using TRUNC function on partitioned column

    Hi All,
    I have a table as follows:
    STEP1
    CREATE TABLE TEST_PARTITION
    EMP_ID VARCHAR2(10 BYTE),
    CREATE_DT DATE,
    EMP_RGN_NM VARCHAR2(2 BYTE),
    DSPTCH_CNT NUMBER
    PARTITION BY RANGE (CREATE_DT)
    SUBPARTITION BY LIST(EMP_RGN_NM)
    SUBPARTITION TEMPLATE(
    SUBPARTITION RGN_E VALUES ('E') ,
    SUBPARTITION RGN_MW VALUES ('MW') ,
    SUBPARTITION RGN_SW VALUES ('SW') ,
    SUBPARTITION RGN_W VALUES ('W') ,
    SUBPARTITION RGN_SE VALUES ('SE')
    PARTITION aug2008 VALUES LESS THAN (TO_DATE('01-Sep-2008', 'DD-MON-YYYY')),
    PARTITION sep2008 VALUES LESS THAN (TO_DATE('01-Oct-2008', 'DD-MON-YYYY')),
    PARTITION oth VALUES LESS THAN (MAXVALUE)
    ENABLE ROW MOVEMENT;
    STEP 2
    insert into TEST_PARTITION values(1000,TO_DATE('01-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10)
    insert into TEST_PARTITION values(1000,TO_DATE('02-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',20);
    insert into TEST_PARTITION values(1000,TO_DATE('03-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',0);
    insert into TEST_PARTITION values(1000,TO_DATE('01-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    insert into TEST_PARTITION values(1000,TO_DATE('02-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    insert into TEST_PARTITION values(1000,TO_DATE('01-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    insert into TEST_PARTITION values(1001,TO_DATE('01-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',1);
    insert into TEST_PARTITION values(1001,TO_DATE('02-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',2);
    insert into TEST_PARTITION values(1001,TO_DATE('03-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',0);
    insert into TEST_PARTITION values(1001,TO_DATE('01-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    insert into TEST_PARTITION values(1001,TO_DATE('02-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',5);
    insert into TEST_PARTITION values(1001,TO_DATE('01-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    insert into TEST_PARTITION values(1001,TO_DATE('02-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
    STEP 3
    I need to get all the dispatches on 1st of August and hence issue the statement as follows:
    select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE'
    Using a function over the partitioned column, will it avaoid partition pruning? I mean will it scan all the partitiones instead of going to specific partition?
    I need this urgently since we are having a discussion on this in few minutes from now.
    Thanks so much
    Saff

    What about a function based index ?
    SQL> select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE';
    Execution Plan
    | Id  | Operation              | Name           | Rows  | Bytes | Cost (%CPU)| Pstart| Pstop |
    |   0 | SELECT STATEMENT       |                |     1 |    32 |     4   (0)|       |       |
    |   1 |  PARTITION RANGE ALL   |                |     1 |    32 |     4   (0)|     1 |     3 |
    |   2 |   PARTITION LIST SINGLE|                |     1 |    32 |     4   (0)|   KEY |   KEY |
    |   3 |    TABLE ACCESS FULL   | TEST_PARTITION |     1 |    32 |     4   (0)|   KEY |   KEY |
    Note
       - 'PLAN_TABLE' is old version
    SQL> create index idx on test_partition (TRUNC(CREATE_DT));
    Index created.
    SQL> select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE';
    Execution Plan
    | Id  | Operation                          | Name           | Rows  | Bytes | Cost (%CPU)| Pstart| Pstop |
    |   0 | SELECT STATEMENT                   |                |     1 |    32 |     2   (0)|       |       |
    |   1 |  TABLE ACCESS BY GLOBAL INDEX ROWID| TEST_PARTITION |     1 |    32 |     2   (0)| ROWID | ROWID |
    |   2 |   INDEX RANGE SCAN                 | IDX            |     1 |       |     1   (0)|       |       |
    Note
       - 'PLAN_TABLE' is old version
    I need this urgently since we are having a discussion on this in few minutes from now.It is not our problem, but yours.
    Nicolas.

  • Doubt in using :Function Module : MS_CONVERT_TO_OTHER_CURRENCY

    Hi ,.
    In the Function Module :MS_CONVERT_TO_OTHER_CURRENCY.
    I have to export following parametes:
    DATE            
    FROM_CURRENCY   
    FROM_AMOUNT     
    TO_CURRENCY     
    COMPANY_CURRENCY
    RATE  (optional)    .
    Here my doubt is :what is the purpose of COMPANY_CURRENCY .What value i have to populate here , how i have to find the  company currency?
    I think we have to find this COMPANY_CURRENCY  based on the sales organization.
    Please update me regarding this COMPANY_CURRENCY .
    Thanks,
    Suresh.

    Have you tried using 'CONVERT_TO_FOREIGN_CURRENCY' instead?
    DATA: v_amount TYPE p DECIMALS 2.
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
    EXPORTING
    date = sy-datum
    foreign_currency = 'INR'
    local_amount = '1.00'
    local_currency = 'USD'
    IMPORTING
    foreign_amount = v_amount
    EXCEPTIONS
    no_rate_found = 1
    overflow = 2
    no_factors_found = 3
    no_spread_found = 4
    derived_2_times = 5
    OTHERS = 6.
    IF sy-subrc = 0.
    WRITE: / 'US dollar to Indian rupees - ', v_amount.
    ENDIF.

  • Doubt  in using html:checkbox in struts

    Hi all,
    In my jsp page i have 2 checkboxes name mandatory and active.
    <html:checkbox property="mandatory" value="true"/>
    <html:checkbox property="active" value="true"/>
    Insertion of data works fine,and now my doubt is about the edit mode.
    In edit mode,depending on th value of thethese fields wheteher 0 or 1,checkbox should be checked.how can it be done?
    In th corresponding for,the properties I declared as boolean values.Also reset method is provided .
    Anyone pls help.
    thanks

    It's rather nasty, but you could wrap all your strings in <html></html>. Even so you still have to use entities, but the
    following displays what you want:JLabel lbl = new JLabel("<html>&lt;html>&lt;/html></html>");

  • Doubt about uses of OBIEE

    I have some doubts about the possible uses of OBIEE. It happens that using OBIEE sometimes users demand report of an "analytical" type, that is aggregated analysis through OBIEE’s Answers, selecting data from dimension tables and measures from fact tables. That’s the ordinary purpose of business intelligence tools!!!
    Some other times though, users demand to perform through Answers analyses of an "operating" type, that is simple extractions of some fields belonging to dimension tables, linked between each other through joins, (hence without querying fact tables): that happens because some of the tables brought in the datawarehouse are not directly linked to any fact table. In this way users want to use Answers to visualize data even for this kind of extractions (or operating reports).
    Is this a correct use of the tool or is it just a “twisted” way of using it, always leading eventually to incorrect extractions? If that’s the case, is it possible to use instead BI Publisher, extracting the dataset through the "Sql Query" mode in a visual manner? The problem of the latter solution, in my case, relies in the fact that users are not enough skilled from the technical point of view: they would prefer to use Answers for every extraction, belonging both to the first type (aggregations) and the second one (extractions), that I just described. Can you suggest a methodology to clarify this situation?

    Hi,
    I understand your point... But I think OBIEE doesn't allow having dimension "on their own", they must be joined to a fact table somehow. This way, when you do a query in answers using fields of two dimension tables a fact table should be always involved. When dimensions are conformed, several fact tables may be used, and OBIEE uses the "best" one in terms of performance. However, there are some tricks that you can do to make sure a particular fact table is used, like using the "implicit fact column" in the presentation layer.
    So back to your point, using OBIEE for "operational" reporting as you call it is a valid option in my experience, but you have to make sure that the underlaying star schema supports the logic that your end users expect when they use just dimension fields.
    Regards,

  • Doubts about use of REPORTS_SERVERMAP with Forms11g HA

    Hi,
    I'm configuring a Linux 64bits Forms/Reports 11g HA environment, the point is that i have two nodes, each one with its Forms and Reports servers, let's say FormsA and ReportsA for the first node and FormsB and ReportsB for the seconde node.
    i want FormsA to be able to call reports from ReportsB and FormsB to be able to call reports from ReportsA.
    I've been reading about REPORT_SERVERMAP
    http://docs.oracle.com/cd/E12839_01/bi.1111/b32121/pbr_conf003.htm#autoId5
    But i have some doubts about its use:
    1. I will not use a shared cluster file system or any way of cache solution, i will only have my rdf files on each node, and i'm wondering if just by configuring this parameter i will be able to get the effect mentioned above ??
    2. The link provided says "Using RUN_REPORT_OBJECT. If the call specifies a Reports Server cluster name instead of a Reports Server name, the REPORTS_SERVERMAP environment variable must be set in the Oracle Forms Services default.env file"
    In fact i'm using RUN_REPORT_OBJECT but
    what is the Reports Server cluster name ?? and where do i find that name ??
    3. Is this configuration well defined:
    REPORTS_SERVERMAP=clusterReports:ReportsA;clusterReports:ReportsB
    4. At forms applications when using RUN_REPORT_OBJECT, can i assume that the report server name will be the cluster name specified at the REPORTS_SERVERMAP ??
    5. Which files should i modify rwservlet.properties or default.env ??
    Hope you can help me :)
    Regards
    Carlos

    Hi,
    1. I will not use a shared cluster file system or any way of cache solution, i will only have my rdf files on each node, and i'm wondering if just by configuring this parameter i will be able to get the effect mentioned above ??
    --> In such case what could go wrong is
    Suppose Run_report_object executed jobs successfully to ReportsA
    But web.show_document command for getjobid failed ( as ReportsA went down by this time)
    --> You will not get the output shown ( though job was successful)
    If shared cache was enabled, then Even if ReportsA is down, other cluster member ( say ReportsB)
    will respond back to web.show_document.
    Point 2,
    --> Under HA is it highly recommended to use web.show_document ( a servlet call) to execute reports. This is to help use all HA features at the HTTP , Webcache or load balancer level.
    However if there is migrated code or Run_report_object is must, then the recommendations as you see in the pointed document is must.
    REPORTS_SERVERMAP setting needs to be configured in rwservlet.properties file and also in default.env Forms configuration file to map the Reports Server cluster name to the Reports Server running on the mid-tier where the Load Balancer forwarded the report request.
    For example FormsA, ReportsA, cluster name say rep_cluster
    default.env file
    REPORTS_SERVERMAP=rep_cluster:ReportsA
    Where "rep_cluster" is the Reports Server cluster name and "ReportsA" is the name of the Reports Server running on the same machine as FormsA
    rwservlet.properties file
    <reports_servermap>rep_cluster:ReportsA</reports_servermap>
    At default.env this is not a valid entry
    REPORTS_SERVERMAP=clusterReports:ReportsA;clusterReports:ReportsB
    what is the Reports Server cluster name ?? and where do i find that name ??
    --> This is created via EM on the report server side.
    Would recommend to refer following documents at the myoracle support repository
         How to Setup Reports HA (High Availability - Clusters) in Reports 11g [ID 853436.1]
         REP-52251 and REP-56033 Errors When Calling Reports From Forms With RUN_REPORT_OBJECT Against a Reports Cluster in 11g. [ID 1074804.1]
    Thanks

  • DOUBT IN USING AN APPROPRIATE STRUCTURE!!

    Good Morning guys,
    I have a doubt in selecting an appropriate structure in forms builder , in order to store the results of a select statement, but i also want this structure to have the ability to retrieve some results parametrically. My basic application is written in Powerbuilder 7 and i want to transfer it in forms builder. Powerbuilder as the most of you know, has datawindows and my basic target is to find an appropriate structure which will have similar properties with datawindows, in order to use them in forms builder. I hope to be clear. So if anyone has dealt with powerbuilder and forms i hope to help me. Are there any structure except from recordgroup and datablocks i can use, and if no which one of thse 2 have i to use?
    Thanx in advance,
    Bill.

    If you need this structure to have the ability to retrieve some results parametrically,
    you can use data block based on a ref cursor, table of record, or FROM clause.
    See Forms help:
    Building and Running a Form
    - Modifying a Form
    -- Adding a Block
    --- Creating a data block from a procedure that uses a ref cursor
    --- Creating a data block from a procedure that uses a table of records
    --- Creating a data block from a FROM clause
    Regards,
    Zlatko Sirotic

  • Doubt with use of PCD Tools

    Dear Experts.
    I am changing  the texts of the the pages and Worksets used for Manager Self-Service(I am using MSS with BP 1.41). For this I am using the PCD Tools and translate the text to the Spanish.
    I have the following doubt:
    The change that i did when I want transport the package to the enviroment of production, this change also pass?
    Best Regards.
    Carmen

    Carmen,
    yes you can do that
    check these links
    http://help.sap.com/saphelp_sm32/helpdata/de/10/521640b7b6dd5fe10000000a155106/content.htm
    portal content translation transport
    Thanks
    Bala Duvvuri

  • Using trunc as difference measure btwn two dates

    I have a SQL query that works smoothly. It takes the difference between sets of dates that are >=0 and <=0. here it is:
    SELECT createdate,  id, objid, start_date, end_date
    FROM greggs_date, HNEMap
    where active =1
    and trunc (createdate-start_date) >=0  and trunc (createdate-end_date) <=0;
    Problem is I can't output the differences. In MS SQL Server you can show the number of days difference with the datediff function named in the SELECT part of the SQL statement not so with trunc used to get date differences. How can this query be rework to show the actual days of difference between start and end from create date.

    Hi,
    robleh7 wrote:
    I have a SQL query that works smoothly. It takes the difference between sets of dates that are >=0 and <=0. here it is:
    SELECT createdate,  id, objid, start_date, end_date
    FROM greggs_date, HNEMap
    where active =1
    and trunc (createdate-start_date) >=0  and trunc (createdate-end_date) <=0;
    Problem is I can't output the differences. In MS SQL Server you can show the number of days difference with the datediff function named in the SELECT part of the SQL statement not so with trunc used to get date differences. How can this query be rework to show the actual days of difference between start and end from create date.
    Sorry, I don't understand the problem.
    TRUNC (createdate - startdate)    is just a NUMBER.  You can display it just like any other NUMBER.
    SELECT  k.hiredate                         AS base_date
    ,       d30.hiredate
    ,       TRUNC (k.hiredate - d30.hiredate)  AS dif
    FROM        scott.emp  k
    CROSS JOIN  scott.emp  d30
    WHERE   k.ename        = 'KING'
    AND     d30.deptno     = 30
    Output:
    BASE_DATE   HIREDATE           DIF
    17-Nov-1981 20-Feb-1981        270
    17-Nov-1981 22-Feb-1981        268
    17-Nov-1981 28-Sep-1981         50
    17-Nov-1981 01-May-1981        200
    17-Nov-1981 08-Sep-1981         70
    17-Nov-1981 03-Dec-1981        -16
    Post a complete test script (including CREATE TABLE and INSERT statements, if needed)  and the results you want from that script.

  • Some doubts in using resource-ref,connection pool n Data-source

    Hi all ,
    I need little bit clarification in the following points.
    1) Does the connection pool which is created can be displayed in JNDI Tree???
    I am seeing only DataSOurce in the JNDI Tree Only.
    2)In case of Bean Managed Persistance, in ejb-jar.xml,
    I had given the following info.
    <resource-ref>
             <res-ref-name>ramukkDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
         </resource-ref>Does the <res-ref-name> refers to Datasource Name??
    In weblogic-ejb-jar.xml
    <reference-descriptor>
           <resource-description>
              <res-ref-name>ramukkDataSource</res-ref-name>
              <jndi-name>ramukkpool</jndi-name>
           </resource-description>
         </reference-descriptor>Here <jndi-name> refers to connection pool as per weblogic bible book.
    If so when i deployed my ejb into the server iam getting Datasource cant be found.
    If i had given like the following,
    In ejb-jar.xml
    <resource-ref>
              <res-ref-name>jdbc/ramuJndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref> In weblogic-ejb-jar.xml
         <reference-descriptor>
              <resource-description>
               <res-ref-name>jdbc/ramuJndi</res-ref-name>
               <jndi-name>jdbc/ramuJndi</jndi-name>
           </resource-description>
        </reference-descriptor>Then only my ejb code is successfully deploying doing some work which is as per xpectation.
    Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
    I am working on this problem from last one week. Still not found the solution.
    Connection Pool Creation
    GENERAL::
    Name : ramukkpool
    url : jdbc:mysql://localhost:3306/test
    Driver Classname: com.mysql.jdbc.Driver
    Properties :
    user = root
    Password = XXX
    create
    TARGETS::
    i had shifted myServer from left side to right side n clicked >>Apply
    (Techncially can we say this as deploying the connection pool into server ???????????
    If not how to deploy the connection pool into server??)
    I did not get any errors in the console.
    Now i am creating a datasource
    CONFIGURATION:
    Name : ramukkDataSource
    JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
    PoolName: ramukkpool
    create
    TARGETS::
    I had shifed myServer from left to right n >>Apply.
    Now also i did not get any errors in the console.Thanx(in advance),
    ramu

    I have read the documentation.
    I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
    My question still remains unanswered, could some kindly help.
    Q? I have defined a data source in JDeveloper using
    oracle.jdbc.pool.OracleConnectionCacheImpl
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
         }}

Maybe you are looking for

  • Multi-tasking not working

    I just updated to the new iOS 4 and when I double click it does not bring up the multi-tasking menu, but rather goes to my phone favorites. I have went to my settings-homebutton -> but there is no option to switch it to "multi-tasking" is there somet

  • PDF Download doesn't keep an aggregate function result

    Hello, I have an interactive report that has a sum that I created using the aggregate function. When I download to a PDF, there is no sum. Does anyone have a solution? Thanks, Matt

  • PL/SQL not working

    Hi there, I wrote a procedure which calls a function to get the query. The SQL in the query is ok, since I have testet it in SQL scratchpad. But wehen I call the procedure it says "Invalid SQL Statement". Can someone please point me to my mistake. Th

  • Problem in downloading ALv Grid output

    Hi Friends,    I've made an ALV report using the FM: REUSE_ALV_GRID_DISPLAY. Now when I try to download the output in excel using the path:LIST->EXPORT->EXCELSHEET, the 'excelsheet' option is showing as disabled. This is happening only for this repor

  • HTTP 1.1

    Hi all, I would want to know as I can make multiple transactions during a single persistent connection ( as it allows HTTP 1.1..). Now, I close and reopen every time the HttpConnection object and I apply every time a new command GET. I would want to