Regarding Date Problem in Oracle.

Dear sir,
I want q query that will give me the output in the following format.
eg. input date is 30.09.2012 then output should be
'Upto 31.03.1996'
'01.04-1996-31.03.1997'
'01.04-1997-31.03.1998'
'01.04-1998-31.03.1999'
'01.04-1999-31.03.2000'
'01.04-2000-31.03.2001'
'01.04-2001-31.03.2002'
'01.04-2002-31.03.2003'
'01.04-2003-31.03.2004'
'01.04-2004-31.03.2005'
'01.04-2005-31.03.2006'
'01.04-2006-31.03.2007'
'01.04-2007-31.03.2008'
'01.04-2008-31.03.2009'
'01.04-2009-31.03.2010'
'01.04-2010-31.03.2011'
'01.04-2011-31.03.2012'
when the input is 31-12-2012 then output
'Upto 31.03.1996'
'01.04-1996-31.03.1997'
'01.04-1997-31.03.1998'
'01.04-1998-31.03.1999'
'01.04-1999-31.03.2000'
'01.04-2000-31.03.2001'
'01.04-2001-31.03.2002'
'01.04-2002-31.03.2003'
'01.04-2003-31.03.2004'
'01.04-2004-31.03.2005'
'01.04-2005-31.03.2006'
'01.04-2006-31.03.2007'
'01.04-2007-31.03.2008'
'01.04-2008-31.03.2009'
'01.04-2009-31.03.2010'
'01.04-2010-31.03.2011'
'01.04-2011-30.06.2012'
likewise going on in the same fashion.
Please provide me solution,
THanks and regards

Hi,
This does what you requested:
VARIABLE  input_date  VARCHAR2 (10)
EXEC      :input_date := '31.12.2012';
WITH    got_end_date      AS
     SELECT  ADD_MONTHS ( TO_DATE (:input_date, 'DD.MM.YYYY')
                  , -6
                  )          AS end_date
     FROM     dual
,     got_start_date     AS
     SELECT     ADD_MONTHS ( TRUNC ( ADD_MONTHS ( end_date + 1
                                        , -3
                       , 'YEAR'
                  , 3
                  )          AS start_date
     ,     end_date
     FROM     got_end_date
SELECT       CASE
           WHEN CONNECT_BY_ISLEAF = 1
           THEN 'Upto '
           ELSE TO_CHAR ( ADD_MONTHS ( start_date
                                      , -12 * LEVEL
                      , 'DD.MM.YYYY-'
       END
       || TO_CHAR ( CASE
                               WHEN  LEVEL = 1
                         THEN  end_date
               ELSE  ADD_MONTHS ( start_date - 1
                                , -12 * (LEVEL - 1)
                       END
            , 'DD.MM.YYYY'
            )        AS txt
FROM       got_start_date
CONNECT BY     LEVEL     <= 17
ORDER BY  LEVEL     DESC
;Boneist has a good point: if you explain what you want, it will be easier for people to provide solutions, and to provide correct solutions.

Similar Messages

  • Date problem in oracle 11g

    iam New to oracle 11g but familiar with SQL 2005
    i have a table Patient which has a column Date_Of_Birth has datatype Date
    and iam writing a query in which if Date_Of_Birth column has a value
    *01/01/1900* then i should be replaced by *' ' or balnk*
    otherwise show date value for that i have made use of
    case
    query
    select case(Date_Of_Birth)-------------this is my column
    when '01/01/1900'
    then ''
    ELSE TO_CHAR( Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from Patient -------------my table
    but error is comming
    Error starting at line 1 in command:
    select case(Date_Of_Birth)
    when '01/01/1900'
    then ''
    ELSE TO_CHAR( Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from Patient
    Error at Command Line:2 Column:5
    Error report:
    SQL Error: ORA-00932: inconsistent datatypes: expected DATE got CHAR
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:
    Edited by: user13066438 on Jan 24, 2011 9:38 PM

    Hi there
    you have date data type in Date_Of_Birth you have to use to_date function
    try this
    select case((Date_Of_Birth)when to_date('01/01/1900', 'DD/MM/YYYY')
    then ''
    ELSE TO_CHAR(Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from table_name;regards
    Hitesh

  • Date problem in Oracle

    Hi,
    I am running the following SQL on my laptop
    “SELECT to_number(to_char(to_date('01-apr-2010','dd-mon-yyyy'), 'd')) FROM dual”
    The result is “4” which is a Wednesday. This should return "5" for Thursday as the 1st of April 2010 is a Thursday.
    Can any one help how to fix this?
    Thanks

    Where do you live?
    Please correct your NLS_TERRITORY or NLS_CALENDAR.
    NLS_TERRITORY is system variable NLS_LANG's second part.
    If your NLS_LANG is set AA_BB.CC, BB is NLS_TERRITORY.
    SQL> SELECT to_number(to_char(to_date('01-apr-2010','dd-mon-yyyy'), 'd')) FROM dual;
    TO_NUMBER(TO_CHAR(TO_DATE('01-APR-2010','DD-MON-YYYY'),'D'))
                                                               5
    SQL>
    SQL> alter session set nls_territory=germany;
    Session altered.
    SQL> SELECT to_number(to_char(to_date('01-apr-2010','dd-mon-yyyy'), 'd')) FROM dual;
    TO_NUMBER(TO_CHAR(TO_DATE('01-APR-2010','DD-MON-YYYY'),'D'))
                                                               4
    SQL> column parameter format a20
    SQL> column value format a40
    SQL> select * from nls_session_parameters
      2  where parameter in ('NLS_LANGUAGE','NLS_TERRITORY','NLS_DATE_LANGUAGE','NLS_CALENDAR');
    PARAMETER            VALUE
    NLS_LANGUAGE         AMERICAN
    NLS_TERRITORY        GERMANY
    NLS_CALENDAR         GREGORIAN
    NLS_DATE_LANGUAGE    AMERICAN

  • DATA EXTRACTION FROM ORACLE & SYBASE

    Hello members...
    Good day. This is my first posting in this site. I am new to Oracle and have a question regarding Data extraction from Oracle and Sybase.
    My project has two applications one having Oracle as the database and the other has Sybase as the database. On the proposed production schedule, there would be a interface data update from the Oracle database to the Sybase database.
    My aim is to check if the data update is in sync after the update. We plan to extract the data from the two databases (Oracle and Sybase) and compare in a Third Party tool. We have the tool to compare. Can any of you suggest a nice data extraction tool. I have to set this data extraction as a batch in the nightly batch schedule.
    Thanks in advance,
    Regards,
    Krishna Kumar...

    Sybase provides the best data extraction utility called BCP. You can load and extract data. It is very user friendly. From your unix prompt if you type in BCP ? you will all the switches and
    help messages you need to use. It is so simple.
    Oracle dosn't have such a utility to extract data from table.
    You need to write a Stored procedure and use UTF_FILE package to
    extract data from table and write into a file.

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

  • A problem regarding set up of Oracle Lite 3.6.0.2.0 on Win 95, with JDK 1.1.8 &java 2

    A problem regarding set up of Oracle Lite 3.6.0.2.0 on Win 95, with JDK 1.1.8 and Java 2 SDK ( Ver 1.3 Beta)
    After the installation of Oracle Lite 3.6.0.2.0 on a laptop (with WIN 95 OS), When I run Oracle Lite Designer from start menu, I receive following error message :
    ====================================
    Invalid class name 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    usage: java [-options] class
    where options include:
    -help print out this message
    -version print out the build version
    -v -verbose turn on verbose mode
    -debug enable remote JAVA debugging
    -noasyncgc don't allow asynchronous garbage collection
    -verbosegc print a message when garbage collection occurs
    -noclassgc disable class garbage collection
    -ss<number> set the maximum native stack size for any thread
    -oss<number> set the maximum Java stack size for any thread
    -ms<number> set the initial Java heap size
    -mx<number> set the maximum Java heap size
    -classpath <directories separated by semicolons>
    list directories in which to look for classes
    -prof[:<file>] output profiling data to .\java.prof or .\<file>
    -verify verify all classes when read in
    -verifyremote verify classes read in over the network [default]
    -noverify do not verify any class
    -nojit disable JIT compiler
    Please make sure that JDK 1.1.4 (or greater) is installed in your machine and CLASSPATH is set properly. JAVA.EXE must be in the PATH.
    ====================================
    My ORACLE_HOME is c:\program files\ora95_2 and Oracle Lite is installed under the ORACLE_HOME in LITE\DESIGNER directory.
    JDK version is 1.1.8 which is greater than 1.1.4 installed in c:\program files\jdk1.1.8, My PATH, and CLASSPATH are set in AUTOEXEC.BAT as follows:
    set CLASSPATH=c:\Progra~1\jdk1.1.8\lib\classes.zip;c:\progra~1\ora95_2\lite\classes\olite36.jar;c:\progra~1\ora95_2\lite\designer\oldes.jar;c:\progra~1\ora95_2\lite\designer\swingall.j ar
    PATH=C:\Progra~1\Ora95_2\bin;.;c:\Progra~1\jdk1.1.8\lib;c:\Progra~1\jdk1.1.8\bin;C:\Progra~1\Ora95_2\lite\Designer;C:\WIN95;C:\WIN95\COMMAND;C:\UTIL
    And, I can run JAVA.EXE from any directory on command prompt.
    With JAVA 2 SDK (ver 1.3 Beta) instead of JDK 1.1.8 I'm getting a different Error message as follows:
    =============================
    java.lang.NoClassFoundError: 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    Please make sure that JDK 1.1.4 (or greater) is installed in your machine and CLASSPATH is set properly. JAVA.EXE must be in the PATH.
    ==============================
    the PATH and CLASSPATH were set accordingly, as with JDK1.1.8, and there was no classes.zip in classpath
    also the class file or the jar file looks weird or wrapped in the error message : 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    Another interesting thing I noticed is if I run oldes.exe from Installation CD, the Oracle Lite Designer runs fine, and without error, I'm able to modify tables in the database of my laptop also.
    Could someone shade some light on what am I doing wrong here ?
    Thanks for help in advance .
    Regards
    Viral
    null

    On 07/20/2015 06:35 AM, Itzhak Hovav wrote:
    > hi
    > [snip]
    > [root@p22 eclipse]# cat eclipse.ini -startup
    > plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    > --launcher.library
    > plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
    >
    > -showsplash
    > org.eclipse.platform
    > --launcher.XXMaxPermSize
    > 256m
    > --launcher.defaultAction
    > openFile
    > -vmargs
    > -Xms40m
    > -Xmx512m
    > [snip]
    Try this: http://wiki.eclipse.org/Eclipse.ini. You should have read the
    sticky posts at forum's top for getting started help.

  • Loading xml data to a oracle database problem in style sheet

    Hi,
    I Have one small Problem While loading xml data to a oracle database.
    In the XML i have the Columns and Data Like this.
    <Data>
    <TRAN>
    <Type_Trs>A</Type_Trs>
    <T1>2</T1>
    <T2>3</T2>
    </TRAN>
    <TRAN>
    <Type_Trs>B</Type_Trs>
    <T1>2</T1>
    <T2>3</T2>
    </TRAN>
    </Data>
    I have TRAN Table having Field Like this.
    TRAN(Type_Trs,T1,F)
    Note:- The XML Column T2 is Not matching with TRAN Table Column F
    I want to fetch T2 data into F column.
    When I am fetching the xml data into oracle table only
    one row is fetching.
    Can You help me
    To load the the all the record of XML data into the Oracle Table
    What will be my XLS Style Sheet File Please
    suggest me.
    Regards
    MBR
    Thnks in Advance

    Hi MBR
    You would be better posting your question to the general XML forums:
    http://forums.oracle.com/forums/category.jspa?categoryID=51
    This is purely for XML/BI Publisher where we get the data back out of the db :o)
    Tim

  • Large Data file problem in Oracle 8.1.7 and RedHat 6.2EE

    I've installed the RedHat 6.2EE (Enterprise
    Edition Optimized for Oracle8i) and Oracle
    EE 8.1.7. I am able to create very large file
    ( > 2GB) using standard commands, such as
    'cat', 'dd', .... However, when I create a
    large data file in Oracle, I get the
    following error messages:
    create tablespace ts datafile '/data/u1/db1/data1.dbf' size 10000M autoextend off
    extent management local autoallocate;
    create tablespace ts datafile '/data/u1/db1/data1.dbf' size 10000M autoextend off
    ERROR at line 1:
    ORA-19502: write error on file "/data/u1/db1/data1.dbf", blockno 231425
    (blocksize=8192)
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    Additional information: 231425
    Additional information: 64
    Additional information: 231425
    Do anyone know what's wrong?
    Thanks
    david

    I've finally solved it!
    I downloaded the following jre from blackdown:
    jre118_v3-glibc-2.1.3-DYNMOTIF.tar.bz2
    It's the only one that seems to work (and god, have I tried them all!)
    I've no idea what the DYNMOTIF means (apart from being something to do with Motif - but you don't have to be a linux guru to work that out ;)) - but, hell, it works.
    And after sitting in front of this machine for 3 days trying to deal with Oracle's, frankly PATHETIC install, that's so full of holes and bugs, that's all I care about..
    The one bundled with Oracle 8.1.7 doesn't work with Linux redhat 6.2EE.
    Don't oracle test their software?
    Anyway I'm happy now, and I'm leaving this in case anybody else has the same problem.
    Thanks for everyone's help.

  • Problem with oracle.jbo.domain.Date

    Hi there,
    I've a problem with oracle.jbo.domain.Date,
    I'm doing this code (this part of code is used in my Session Attribute Listener):
    * This method is used to add the session id in the database, whenever user login
    public void attributeAdded(HttpSessionBindingEvent hsbe){
    if(!hsbe.getName().equals("user")){
    return;
    AmLogin am = (AmLogin)Configuration.createRootApplicationModule(
    "com.ahm.pdt001.am.AmLogin",
    "AmLoginLocal");
    try{
    hsbe.getSession().setAttribute("login", new Date(new Timestamp(
    System.currentTimeMillis())));
    am.createLogin(hsbe.getValue().toString(), hsbe.getSession().
    getAttribute("login").toString());
    } catch(Exception e){
    e.printStackTrace();
    System.out.println("Error insert data user: " + hsbe.getValue());
    } finally{
    Configuration.releaseRootApplicationModule(am, true);
    Everything is running well in Jdev 10.1.3 (I'm using ADF Faces technology), and I'm trying to deploy it on OC4J 10.1.2 and it works. But it raised an error when this part of code is runned.
    --------------caused and error------------------------
    hsbe.getSession().setAttribute("login", new Date(new Timestamp(
    System.currentTimeMillis())));
    And this is an error:
    javax.faces.FacesException: #{pdt001.loginAction}: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)     at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)     at com.ahm.filter.AhmFilterSession.doFilter(AhmFilterSession.java:45)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:534)Caused by: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)     ... 23 moreCaused by: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V     at com.ahm.pdt001.listener.Pdt001AttributeSessionListener.attributeAdded(Pdt001AttributeSessionListener.java:27)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindHttpSession.setAttribute(EvermindHttpSession.java:128)     at com.ahm.pdt001.bean.Pdt001Bean.loginAction(Pdt001Bean.java:61)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:324)     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    Does anybody have the same problem like this? I've used the same method in my previous project to create oracle.jbo.domain.Date with current time using java.sql.Timestamp, but I don't know why this error happened.
    Thx,
    Andre

    Re: oracle jbo.domain.Date issues in 10.1.3
    Sascha

  • Problem to reproject data stored in Oracle through GeoServer

    Good morning
    I am currently trying to reproject some GIS data into the Antarctic Polar Stereographic projection. (see http://nsidc.org/data/atlas/epsg_3031.html)
    This GIS data to be reprojected has been stored into Oracle (Oracle locator) through mapBuilder or Spatial Console with no specified SRS.
    By default, in my GeoServer, the data is marked as having the SRS:4326 in order to calculate the geographical extension.
    When sending a request to my Geographical server (Geoserver 1.6.3) in order to reproject the data into the Antarctic projection (SRS:3031), i got a white page which means that the projection has not been done correctly.
    My URL to generate this map is: ..?service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3031&format=image/gif&width=1000&height=1000&bbox=-12400000,-12400000,12400000,12400000&layers=fifao:fa_areas
    I know this URL is corrrect because it works perfectly when the data is stored in a shapefile format or in a table in PostGIS but not when it points to a table in Oracle.
    So i would tend to think that the problem is at Oracle level.
    Moreover, i tried to specify some SRS when loading a shapefile in Oracle through MapBuilder or Spatial Console and the result is the same or even worst.
    In fact the GIS data stored in a table generated by MapBuilder with a 4326 SRS, can only be seen partially.
    If anyone could help me understanding why data stored in Oracle can not be reprojected while it works for other GeoDatabase or formats, i would be very grateful?
    Could it be related to the media i used to load shapefile? The fact that i have only a locator license?
    Many thanks in advance for your help and i hope it is clear enough.
    Sylvain

    Good morning
    I am currently trying to reproject some GIS data into the Antarctic Polar Stereographic projection. (see http://nsidc.org/data/atlas/epsg_3031.html)
    This GIS data to be reprojected has been stored into Oracle (Oracle locator) through mapBuilder or Spatial Console with no specified SRS.
    By default, in my GeoServer, the data is marked as having the SRS:4326 in order to calculate the geographical extension.
    When sending a request to my Geographical server (Geoserver 1.6.3) in order to reproject the data into the Antarctic projection (SRS:3031), i got a white page which means that the projection has not been done correctly.
    My URL to generate this map is: ..?service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3031&format=image/gif&width=1000&height=1000&bbox=-12400000,-12400000,12400000,12400000&layers=fifao:fa_areas
    I know this URL is corrrect because it works perfectly when the data is stored in a shapefile format or in a table in PostGIS but not when it points to a table in Oracle.
    So i would tend to think that the problem is at Oracle level.
    Moreover, i tried to specify some SRS when loading a shapefile in Oracle through MapBuilder or Spatial Console and the result is the same or even worst.
    In fact the GIS data stored in a table generated by MapBuilder with a 4326 SRS, can only be seen partially.
    If anyone could help me understanding why data stored in Oracle can not be reprojected while it works for other GeoDatabase or formats, i would be very grateful?
    Could it be related to the media i used to load shapefile? The fact that i have only a locator license?
    Many thanks in advance for your help and i hope it is clear enough.
    Sylvain

  • Problem finding data in an Oracle Database using CMP beans

    I am having a problem retrieving data from an Oracle database that has a date as
    part of the key. This data was loaded into my database via a batch process writing
    in java using java.sql.Date to store the date information. When calling the findByPrimaryKey
    method of a CMP Entity Bean I continued to get the FinderException. I know this
    data is in my database because I can view the data via SQLPlus and Microsoft Access.
    Has anyone ever experience problems with CMP beans accessing data from an Oracle
    database that had a date as part if the key or with accessing data in the database
    that insert via another method outside of your CMP bean. I desperately need some
    answers.

    Hi Dave,
    You should probably post this type of question in the CMP or JDBC section
    for best results. Chances are that the date is suffering from a rounding
    problem (it could be a date/time in the database with a different time zone)
    or is not the date that you think it is (wrong century or millenium). I've
    seen both. You need to write a quick piece of code that loads in those
    values as both Java timestamps and dates and makes sure that they are what
    you think they are.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Dave White" <[email protected]> wrote in message
    news:3c1a4ac3$[email protected]..
    >
    I am having a problem retrieving data from an Oracle database that has adate as
    part of the key. This data was loaded into my database via a batchprocess writing
    in java using java.sql.Date to store the date information. When callingthe findByPrimaryKey
    method of a CMP Entity Bean I continued to get the FinderException. Iknow this
    data is in my database because I can view the data via SQLPlus andMicrosoft Access.
    Has anyone ever experience problems with CMP beans accessing data from anOracle
    database that had a date as part if the key or with accessing data in thedatabase
    that insert via another method outside of your CMP bean. I desperatelyneed some
    answers.

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • Problem loading PostgreSQL Bytea data type to Oracle Raw data type

    We are migrating our database from PostgreSQL to Oracle. First, we convert the BYTEA data type in PostgreSQL to Oracle RAW. The BYTEA data type is variable bytes array. How can we load the BYTEA data type to Oracle RAW data type? Or I have to convert to different data type. thanks.
    Peter,

    hi,
    Instead of 'interval day to second' in method declaration use internal datatype 'DSINTERVAL_UNCONSTRAINED'.
    There are more unconstrained types in oracle.
    Bartek

  • Connection problem to Oracle 11.1.0 on Windows Professional XP (SP2)

    Hello
    I've recently performed default installations for 3 Oracle Databases, into seperate homes on a newly formatted Windows
    Professional XP (SP2) standalone laptop. For all databases Oracle 10.2.0 (rover), Oracle XE (xe) and Oracle 11.1.0 (fido) I
    installed APEX and they worked perfectly.
    I then installed my Wireless O2 Broadband for my internet which uses DHCP
    I am unable to connect to my databases with the wireless broadband connected. I then bring down all databases and turn
    off/disable the Broadband,then restart all databases.
    Using commands
    Set ORACLE_SID=ROVER
    sqlplus system/rover@rover
    Set ORACLE_SID=XE
    sqlplus system/xe@xe
    Set ORACLE_SID=FIDO
    sqlplus system/fido@fido
    Connections are successfull apart from the Oracle 11.1.0 (fido) database with error
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    Can anybody identify my connection problem to Oracle 11.1.0 (fido) database by reviewing my listener.ora, tnsnames.ora and
    other configuration files below.
    Many thanks in advance
    Regards
    Ade
    tnsping results
    ===============
    C:\>tnsping rover
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localho
    t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rover)))
    OK (10 msec)
    C:\>tnsping xe
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bascilic
    o)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (30 msec)
    C:\>tnsping fido
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
    t)(PORT = 1523)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = fido)))
    OK (20 msec)
    lsnrctl stat - results
    ======================
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1523)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.1.0.7.0 - Production
    Start Date 17-OCT-2009 15:54:12
    Uptime 0 days 0 hr. 32 min. 11 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\11.1.0\db_fido\network\admin\listener.ora
    Listener Log File c:\oracle\product\11.1.0\diag\tnslsnr\bascilico\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1523ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bascilico)(PORT=1523)))
    The listener supports no services
    The command completed successfully
    General configuration - Environment variables
    =============================================
    PATH =
    C:\oracle\product\11.1.0\db_fido\bin;C:\oracle\product\10.2.0\db_rover\bin;C:\oracle\oraclexe\app\oracle\product\10.2.0\serve
    r\bin;C:\oracle\ohs\bin;C:\oracle\ohs\jlib;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI
    Technologies\ATI Control Panel
    TNS_ADMIN = C:\oracle\tns
    C:\oracle\tns\tnsnames.ora
    ==========================
    ROVER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = rover)
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    FIDO =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = fido)
    Oracle 10.2.0 listener.ora
    ==========================
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_rover)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    Oracle 10.2.0 tnsnames.ora
    ==========================
    ROVER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = rover)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Oracle XE listener.ora
    ======================
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oracle\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    DEFAULT_SERVICE_LISTENER = (XE)
    Oracle XE tnsnames.ora
    ======================
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    Oracle 11.1.0 listener.ora
    ==========================
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    Oracle 11.1.0 tnsnames.ora
    ==========================
    LISTENER_FIDO =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    FIDO =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = fido)
    )

    For static registration you need to update the 3 listener.ora files.
    Exemple:
    SID_LIST_LISTENER_FIDO =
      (SID_LIST =
        (SID_DESC
          (ORACLE_HOME = <Oracle Home path>)
          (SID_NAME=FIDO)
    )

  • 4 Problems in Oracle ASCP

    Hi,
    I have 4 problems with Oracle ASCP. 1) I have defined and saved unconstrained plan but the same is not seen in the Planner's workbench. 2) When I try to create and save simulated plan, it throws an error saying "the record already exists, you have entered duplicate values" 3) I am unable to define and save Profile Options as the corresponding fields are not activated. 4) i have created a query to retrieve information of a particular product and executed it successfully for the first time, but when I attempt to execute the same query again for the next time it asks for re-naming of the query i did it, after that when i clicked on OK button an error is displayed saying  "the record already exists, you have entered duplicate values" I am a beginner and working for a live project. I request you to please help me in resolving the above errors.

    hello,
    regarding 1:
    you need to put a group frame around the graph and make it collapsable. that way on the second page where there is nograph, the room is collapsed to 0 and your table can start from the top.
    regarding 2:
    you can not do summaries in the graph itself. the graph just visualizes the data of a query. so you need to have a query that returns you the data in the desired format.
    regards,
    philipp

Maybe you are looking for

  • I cannot install updates on my macbook and itunes no longer works.

    I have a macbook that is 3-4 years old. Recently it stopped booting up at all, however was able to restore using original discs. However, my itunes doesn't work and I cannot install any updates at all. I can download the updates from apple, however,

  • Maximum WPA2 key size for Apple TV (gen 2 & 3)

    Does anyone know the maximum key size for WPA2?  I am using a Airport Extreme with a key size of 63 characters and the Apple TV doesn't seem to accept it.  Before I reconfigure the whole network, I would like to know the max key size versus trial and

  • How to force multiple columns in the Details section

    Hello, My report has a lot of data in the Details section, but it could fit on one page if I could put it in three columns. Is there a way to do this? The Details section has setting: Force the new page after certain number of visible records. This w

  • Cache records

    I have 1000 records in a table based upon a search condition i am fetching 100 records. I have to display record one by one with previous and next button. I dont want to go back to my database to fetch the records one by one among the 100 records. I

  • Tap to tweet on iOS 7??

    I just upgraded to iOS 7 and I can't find the tap to tweet and tap to post on my iPhone 4?? Am I supposed to do something new?