Problem With Package Statement

Hello -
I am semi new to Java and I am trying to place two classes I have created into a package. At the top of both classes I have the statement:
package mycode.stringtests;
I have saved both files into d:\jf\mycode\stringtests and set my classpath variable to d:\jf;.
I can compile just fine, but when I go to run from the command line with the java command I get an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: StringTest (wrong name mycode/stringtests/StringTest)
Any ideas? Thanks!

You probably cd to the stringtests directory and using
the command "java StringTest"
java is finding a file named StringTest.class, but
when it looks inside the file, it finds that the fully
qualified name of the class is
mycode.stringtests.StringTest. Since the name you
supplied in the argument is different from the fully
qualified name, you get a wrong name error.
When a class is executable and part of a package, you
need to supply the fully qualified name of the class.
So your command should be "java
mycode.stringtests.StringTest"Hi,
I am having the same problem as the one mentioned and I have come here to find a solution. I have tried the answer you suggested and am still getting the same error message as above. Could you please elaborate or point me to some more information on the topic.

Similar Messages

  • Problem with Package State

    Hi All,
    I have a situation where I have a package I am working on in one schema (say AUX) that has functions being called by a trigger in another schema (say MAIN). Whenever I change and recompile the package the trigger throws the following error:
    Error CALL__ACT_FUNC_STP ORA-04068: existing state of packages has been discarded
    ORA-04068: existing state of packages (AUX.US.ORACLE.COM) has been discarded
    ORA-04061: existing state of package body "AUX.ACTIVITY_NOTIFICATION" has been invalidated
    ORA-04065: not executed, altered or dropped package body "AUX.ACTIVITY_NOTIFICATION"
    ORA-06512: at "MAIN.ACTION_AFTER_UPD_STATUS", line 63
    ORA-04088: error during execution of trigger 'MAIN.ACTION_AFTER_UPD_STATUS'
    When I inflict this upon mysef it errors once and then never again until I make another change. When my users experience this it comes from only a handful and then doesnt happen again. BTW, this is Oracle 9 serving a web application hosted by websphere.
    Can someone explain why this happens, and more importantly how I can deploy changes without causing this particular speedbump?
    Thanks in advance!
    Michael

    When we execute a package a version of it is stored in the session memory cache. This is how variables set in the package persist between calls. When someone recompiles the package that invalidates our stored version of it. This happens even if the package is SERIALLY_REUSEABLE.
    Unfortunately the only way to fix ORA-04068 is to close the session and reconnect. I guess this explains your users' expereinces - I guess you're using some form of connection pooling, so only those users who connect with an existing connection will notice. I don't know the specifics of your set-up but I think you'll need to synchronise a flush of your connection pool with the deployment of your trigger code. I expect that will be difficult in a 24-7 environment but zero downtime is an aspiration not a realistic goal.
    Cheers, APC

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Problem with packages, part duex

    Solaris 11 x86 under VBox
    Continuing from problem adding packages
    I got the mechanics of adding packages working and successfully installed the packages for x11 support.  Next I need to add some packages to install Oracle database.  Packages are listed in the database Installation Guide.
    First, check to see if the required packages are already installed:
    root@vbsolsrv02:~# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibms SUNWsprot   SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
    system      SUNWarc   Lint Libraries (usr)
    system      SUNWbtool CCS tools bundled with SunOS
    system      SUNWhea   SunOS Header Files
    system      SUNWlibC  Sun Workshop Compilers Bundled libC
    system      SUNWlibms Math & Microtasking Libraries (Usr)
    system      SUNWsprot Solaris Bundled tools
    system      SUNWtoo   Programming Tools
    ERROR: information for "SUNWi1of" was not found
    ERROR: information for "SUNWi1cs" was not found
    ERROR: information for "SUNWi15cs" was not found
    ERROR: information for "SUNWxwfnt" was not found
    Not being familiar with the interpretation of the error msgs (or much else with Solaris) I figured it wouldn't hurt to just try to install them.
    root@vbsolsrv02:~# pkg install SUNWi1of
    pkg install: The following pattern(s) did not match any allowable packages.  Try
    using a different matching pattern, or refreshing publisher information:
            SUNWi1of
    root@vbsolsrv02:~# pkg install SUNWi1cs
    No updates necessary for this image.
    root@vbsolsrv02:~# pkg install SUNWi15cs
    No updates necessary for this image.
    root@vbsolsrv02:~# pkg install SUNWxwfnt
    pkg install: The following pattern(s) did not match any allowable packages.  Try
    using a different matching pattern, or refreshing publisher information:
            SUNWxwfnt
    root@vbsolsrv02:~#
    at this point, repeating the pkginfo command produced exactly the same results as before.
    So, what am I to learn from this and how should I proceed from here?

    PascalKreyer-Oracle wrote:
    These packages are requirement for Solaris 10. As these packages are not available for Solaris 11, please check again in the database installation guide to determine which packages are really necessary.
    Ah, the devil is always in the fine print.  I am planning on installing Oracle 11.2, so from the Database Quick Installation Guide
    11g Release 2 (11.2) for Oracle Solaris on x86-64,  the packages were listed under this statement:
    The following packages (or later versions) are required for Oracle Database 11g Release 2 (11.2) on Oracle Solaris 10:
    I overlooked the proviso "on Oracle Solaris 10".  There was no separate listing for Solaris 11.
    Also, going back and double checking the entire section on software requirements, I see that only Oracle 11.2.0.3 or later is supported on Solaris 11.  So if I want to install Oracle 11.2.0.1, I'll need to drop back to solaris 10.
    Thanks for the focus.

  • Rather odd problem with package naming...

    Background info:
    I'm working on a web-based application, on a Tomcat server. Classes (and packages) must be in a subfolder of WEB-INF/classes of the app's root. So the packages are in WEB-INF/classes/com/<package>.
    The older packages are in com/gestion (for the package com.gestion ) and the newer ones are in com/incsolution/<various> where <various> can be either chart, util or pgm - following convention more closely.
    OK! We have a class called SqlBean in com.gestion, which starts off like so:package com.gestion;
    import java.sql.*;
    import javax.sql.*;// stock pour pooled connection c'est dans javax.sql
    import javax.naming.*;
    import java.io.*;
    public abstract class SqlBean
        ...rest of code...
    }and is used in several other objects, like TransferQBean.java, which is in the same package:
    package com.gestion;
    import java.sql.*;
    public class TransfertQBean extends SqlBean
       ...rest of code...
    }Now, i've been working (with others) on this project for 2 years now, and up until last week, there was no problem with the way things were called. Come Monday (April 11), the classes won't compile any more - gives me this error:
    classes/com/gestion/TransferQBean.java [5.1] cannot resolve symbol
    symbol : class SqlBean
    location: class com.geastion.TransferQBean
    public class TransferQBean extends SqlBean
    ....................................................................^
    Now if i add classes to com.gestion to get...
    package classes.com.gestion;
    import java.sql.*;
    public class TransfertQBean extends SqlBean
       rest of code...
    }and same for SqlBean...
    package classes.com.gestion;
    import java.sql.*;
    import javax.sql.*;// stock pour pooled connection c'est dans javax.sql
    import javax.naming.*;
    import java.io.*;
    public abstract class SqlBean
       ...rest of code...
    }...it works, but that's not how it's supposed to be. What puzzles me the most is how this came about suddenly.
    Anyone have an idea what might be causing this? AFAIK, it's abnormal...
    JH

    classes/com/gestion/TransferQBean.java [5.1] cannot resolve symbol
    symbol : class SqlBean
    location: class com.geastion.TransferQBean
    public class TransferQBean extends SqlBean
    ....................................................................^The solution to your problem is simply that your classpath is incorrect at compile-time. How you fix that depends on how you compile (from an IDE, from the command-line javac tool, etc). But whatever you do, don't make your solution depend on a system environment CLASSPATH variable.

  • Problem with packageing and deploying a sample application

    HI,
    I have tried to download and install the server in my system. I am able to deploy a sample application using autodeploy utility.
    But when i tried to package a new sample application and deploy i am getting 404 error. For application server i have used 7070 port and not the default 8080 port will this a problem to package & deploy sample application provided with this software.
    The error is as below:
    HTTP Status 404 - /hello1
    type Status report
    message /hello1
    description The requested resource (/hello1) is not available.
    Sun-Java-System/Application-Server

    Btw, verify that the url you are trying to access is correct. For instance, assuming you deploy app. without --contextroot option. By default,  the url is http://<host>:<port>/<web module name>/<value of url-pattern in web.xml> if your app contains servlet. If your app has jsp then it's http://<host>:<port>/<web module name>/<value of url-pattern in web.xml>/<name of jsp>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with import statement !!!

    Hi all,
    When I'm compiling a java progam(client program in an EJB application) I'm getting the following error.
    \ejb\converter\ConverterClient.java:14: '.' expected
    import Converter;
    ^
    \ejb\converter\ConverterClient.java:15: '.' expected
    import ConverterHome;
    ^
    2 errors
    All files , Home interface , bean class , remote interface and client program are all in same folder. And no package statement is used.
    When I had removed the above statements , it compiled well.But After when running the client (after every thing is done and deployed bean in J2EE server using deploy tool ), the following error is coming..
    Binding name:`java:comp/env/ejb/SimpleConverter`
    Application threw an exception:java.lang.NoClassDefFoundError: ConverterHome
    Unbinding name:`java:comp/env/ejb/SimpleConverter`
    Can any one suggest a solution with explanation ???
    I'm using J2SE 1.4 beta 2 version. This J2EE SDK us designed for J2SE 1.3 . is this the reason ??
    Thanks in advance..
    ashok

    Did you added the <your_ejb>.jar file to the classpath??
    /Sreenivasa Kumar Majji.
    Hi all,
    When I'm compiling a java progam(client program in an
    EJB application) I'm getting the following error.
    \ejb\converter\ConverterClient.java:14: '.' expected
    import Converter;
    ^
    \ejb\converter\ConverterClient.java:15: '.' expected
    import ConverterHome;
    ^
    2 errors
    All files , Home interface , bean class , remote
    interface and client program are all in same folder.
    And no package statement is used.
    When I had removed the above statements , it compiled
    well.But After when running the client (after every
    thing is done and deployed bean in J2EE server using
    deploy tool ), the following error is coming..
    Binding name:`java:comp/env/ejb/SimpleConverter`
    Application threw an
    exception:java.lang.NoClassDefFoundError:
    ConverterHome
    Unbinding name:`java:comp/env/ejb/SimpleConverter`
    Can any one suggest a solution with explanation ???
    I'm using J2SE 1.4 beta 2 version. This J2EE SDK us
    designed for J2SE 1.3 . is this the reason ??
    Thanks in advance..
    ashok

  • Problem with import statement for user created classe

    I recently downloaded J2sdk1.4.0_03 before that I had jdk1.3 and never had this problem.All the files other than named package I import for my
    application does not compile.But when I commented that out it work just fine.
    any help is appreciated

    thanks
    It makes sense not to import non-packaged class.
    My other problem is with JDBC ODBC.I have a Dell system with Windows XP.
    I registered my User Data Source to ODBC with MS Text driver(.txt , csv).When the code reaches at the .executeUpdate(CREAT TABLE CUSTOMERS)
    it throws an exception
    sQLException 3:java.sql.SQLException: [Microsoft][ODBC Text Driver] Cannot modify the design of table 'CUSTOMERS'. It is in a read-only database.
    Do I really need to change the attribues or some thing else.
    How can I chane the attributes of the database.Never had problem with windows 98.

  • Problem with Packaging Material Type

    Hello all Gurus,
    I have a problem with a packaging material type that I have created copying the standrad Packaging material type LEIH. I created a new packing material type ZPAC - Packaging Material copying LEIH.
    I then created a new material master record using this new material type ZPAC.
    When I am using this material for packing in outbound delivery document - VL01N, I am getting the following strange error message:
    20333 does not have packaging material type and is therefore not a pack.mat.
    Please suggest me why this error is coming and how I can rectify this error. Is there any further configuration that I need to do for packaging material types??? Kindly suggest.
    Thanks and Regards,
    Umakanth.

    Hi,
    Material type is not enough, you have to maintain proper master data as well as config.
    At least please maintain value in MARA-VHART for the packaging material. Please also check these links how HUM works:
    http://www.sap-img.com/sap-hu.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/c8/a44b779f3211d2858d0000e81ddea0/frameset.htm
    Regards,
    Csaba

  • Problem with PIVOT statement and ORA-56901

    Hi,
    I am having a problem with PIVOT in Oracle.
    I have a view in an oracle 11g database
    that returns me data in the format:- (... indicates left out text)
    DefinitionID ... AttributeValue FieldID
    ============ ============== =======
    ... 3000 X30a9...
    ... JohnN X4674...
    I am then trying to use a PIVOT statement to hopefully give me data
    in the format
    COLUMN1 COLUMN2
    ======= =======
    JohnN 3000
    The PIVOT statement I am trying is
    SELECT X4674... AS Column1,
    X30A9... AS COLUMN2
    FROM (SELECT instanceid, definitionid, attributevalue, FIELDID
    FROM PI_ENTITY_INSTANCE_VIEW) up PIVOT (MAX(ATTRIBUTEVALUE)
    FOR FIELDID IN (X4674...,X30A9... ) )
    where definitionid = hextoraw('7353C67A56C74B5A8234CD16064399E8')
    I have used a very similar VIEW and PIVOT statement for sql server
    (with necessary changes for Oracle applied) and the
    data returns in SQL Server as expected.
    Unfortunately I am getting the Oracle error
    ORA-56901: non-constant expression is not allowed for pivot|unpivot values
    Is there anyway to get a PIVOT working on Oracle where I use the
    fieldid's like I do above or is there some other way to supply the vales to the
    IN clause to overcome this error?
    Thank you for any help you can provide
    John Nugent

    Hi, John,
    Welcome to the forum!
    X4674, X30A9 and os on are the literal values that you're looking for, right?
    In Oracle, string literals need to be enclosed in single-quotes, like this:
    FOR FIELDID IN ('X4674', 'X30A9') You might find it more convenient to assign column aliases in the PIVOT clause, like this:
    PIVOT   (     MAX (attributevalue)
         FOR     fieldid       IN ( 'X4674'     AS column1
                        , 'X30A9'     AS column2
         ) Remember that anything inside quotes is case-sensitive, so 'X30A9' is not equal to 'X30a9'. Use UPPER (or LOWER) to do case-insensitive string comparisons.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    If you can use commonly available tables (such as those in the scott or hr schemas) to show your problem, then you don't have to post any sample data; just the results and explanation.
    Always say which version of Oracle you're using. You did say you were using Oracle 11g, but there's no 11f or 11h, and sometimes the difference between, say 11.1 and 11.2 can be significant. Why not say exactly what you're using, e.g. 11.1.0.7.0?
    You'll get better answers faster if you always supply this information whenever you post a question.
    Edited by: Frank Kulash on Sep 22, 2011 2:09 PM
    Added allliterative alias alternative
    Edited by: Frank Kulash on Sep 22, 2011 4:04 PM

  • Problem with Package Applications

    Ok, I'm trying to migrate an Apex Application from one server to a newer server....
    My custom app I used the theme from Go Live CheckList samples....
    Well, when trying to install that application I get 'Insufficient space to install application ' with a BIG red X...
    I was able to install other Package Application except for the one I need and now my application errors out because of
    some shared Themes....
    At first I thought it was a DB thing so I downgraded back to 10g from 11....but that didn't help...
    Apex works fine...
    Other samples work fine...
    Version Apex 4.2.2 and Oracle XE 10g...

    Yes,
    It errors out in 11g XE and when it was the only Application installed...
    I know the error sounds like the OS but I can't see it being the issue since the
    other server has less space and more application on it...
    Plus the database is empty ....
    The other one is Apex 4.2.1 .. I think there is a problem with 4.2.2 packaged applications..

  • Problem with package in Eclipse

    I am doing in Java codes. There is big problem with those error:
    package org.eclipse.emf.ecore.xml.type.internal;What I should to do that? Do you think I need to download some package from somewhere for Eclipse?
    I have already Eclipse. Please help me how to do that. Thanks.

    I wrote codes in there. But there is some errors in there because they said that I don't have package exist in Eclipse. I have no idea why.
    Those lists below got red line:
    package org.eclipse.emf.ecore.xml.type.internal;
    import org.eclipse.emf.common.util.WrappedException;
    import org.eclipse.emf.ecore.xml.type.InvalidDatatypeValueException;
    import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil;I tried to run it and the errors said:
    InvalidDatatypeValueException cannot be resolved to a type.
    The declared package "org.eclipse.emf.ecore.xml.type.internal" does not match excpected package"
    The import org.eclipse cannot be resolved
    WrappedException cannot be resolved to a type
    XMLTypeUtil cannot be resolved{code}
    What is wrong with it? Do you think there is missing plugin package or what? Where can I find a package for that?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Hai ,problem with packages

    Hai all,
    i got a problem with user defined packages .i have one class under one package "sg.km" n the class name is kmc.class n i want to use that sg.km.kmc in some another class that is also a part of sg.km package .i hope i'll get reponses to my prob asap.
    thanks in advance
    yours
    srinu kumar reddy

    You should not need to import a class that is in the same package.
    You did not post enough information for me to give you a good answer. You should always post an error message along with any command you entered. All you said was, "i got a problem." We don't know if your problem is with compiling, running, jar file, applet, etc.
    You need to have a directory structure that matches your package. The kmc.class file a sg\km directory path. For example, c:\myjava\classes\sg\km\kmc.class. Then you need c:\myjava\classes directory in your Classpath both for compiling and running.

  • Emergency: problem with update statement!

    hello guys, i have a very serious problem with an update statement in pl/sql.
    i had an application written in sybase, where i had the following update statement:
    update mis_dik_adeia
    set trexon_etos_days = days_per_year
    from mis_dik_adeia, mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    and mis_dik_adeia.adeia_id between :aapo and :aews
    and mis_dik_adeia.employee_id = :erg
    and mis_dik_adeia.etos = :etos
    and mis_plafon_adeivn.years_yphr = ( select max( a.years_yphr ) from mis_plafon_adeivn a where a.adeia_id = mis_plafon_adeivn.adeia_id and a.years_yphr <= :eth ) using sqlca;
    This is working properly in sybase. When i copied this code in pl/sql it displayed me error and it's impossible to work. Then i thought to make a nested select statement like this:
    update mis_dik_adeia
    set trexon_etos_days = (select days_per_year
    from mis_dik_adeia, mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    and mis_dik_adeia.adeia_id between aapo and aews
    and mis_dik_adeia.employee_id = erg
    and mis_dik_adeia.etos = etos1
    and mis_plafon_adeivn.years_yphr = (
    select max( a.years_yphr )
    from mis_plafon_adeivn a
    where a.adeia_id = mis_plafon_adeivn.adeia_id
    and a.years_yphr <= eth )
    but as you can understand, it is working, but it doesn't produce the same results as the update statement in Sybase!
    It is very important for me to solve this problem , which is a very big trouble for me for a long time.
    Please if anyone can help me i would appreciate it a lot!
    Regards ,
    Bill...

    Bill,
    folowing the logic of your original query by Sybase
    (it's embedded SQL in Power Builder, isn't it ?):
    update mis_dik_adeia
    set trexon_etos_days = (select days_per_year
    from mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    and mis_plafon_adeivn.years_yphr = (
    select max( a.years_yphr )
    from mis_plafon_adeivn a
    where a.adeia_id = mis_plafon_adeivn.adeia_id
    and a.years_yphr <= eth )
    where
    mis_dik_adeia.adeia_id between aapo and aews
    and mis_dik_adeia.employee_id = erg
    and mis_dik_adeia.etos = etos1
    and
    exists (select 1
    from mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    and mis_plafon_adeivn.years_yphr = (
    select max( a.years_yphr )
    from mis_plafon_adeivn a
    where a.adeia_id = mis_plafon_adeivn.adeia_id
    and a.years_yphr <= eth )
    In 9i you can also try the following:
    megre into mis_dik_adeia
    using (
    select
    days_per_year,
    mis_dik_adeia.rowid rid
    from mis_dik_adeia, mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    mis_dik_adeia.adeia_id between aapo and aews
    and mis_dik_adeia.employee_id = erg
    and mis_dik_adeia.etos = etos1
    and mis_plafon_adeivn.years_yphr =
    (select max( a.years_yphr )
    from mis_plafon_adeivn a
    where a.adeia_id = mis_plafon_adeivn.adeia_id
    and a.years_yphr <= eth)
    ) src
    on (mis_dik_adeia.rowid = src.rid)
    when matched then
    update set mis_dik_adeia.trexon_etos_days = src.days_per_year
    when not matched then
    insert (mis_dik_adeia.adeia_id) values(0);
    In 10G it can be easily:
    megre into mis_dik_adeia
    using (
    select
    days_per_year,
    mis_dik_adeia.rowid rid
    from mis_dik_adeia, mis_plafon_adeivn
    where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
    mis_dik_adeia.adeia_id between aapo and aews
    and mis_dik_adeia.employee_id = erg
    and mis_dik_adeia.etos = etos1
    and mis_plafon_adeivn.years_yphr =
    (select max( a.years_yphr )
    from mis_plafon_adeivn a
    where a.adeia_id = mis_plafon_adeivn.adeia_id
    and a.years_yphr <= eth)
    ) src
    on (mis_dik_adeia.rowid = src.rid)
    when matched then
    update set mis_dik_adeia.trexon_etos_days = src.days_per_year;
    I have to notice I didn't check it carefully, so I can miss...
    Rgds.
    Corrected a mistake in the table name
    Message was edited by:
    dnikiforov

  • Problem with Decode statement

    Hi
    I am trying to achieve the following in my report:
    If an employee has a surname of . (dot) or a first name of . (dot), the report should not display a dot. An employee's name is made up of surname, first name and middle name which should all be concatenated together. To try to achieve this, I have the following statement in my report:
    decode(e.Surname, '.', ( LTRIM(RTRIM((INITCAP(e.FIRST_NAME)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    e.FIRST_NAME, '.', ( LTRIM(RTRIM((INITCAP(e.Surname)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    ( LTRIM(RTRIM((INITCAP(e.SURNAME )))||', '||INITCAP(e.FIRST_NAME)||' '||INITCAP(e.MIDDLE_NAME)) ) ) as emp_name
    FROM Employee e
    Problem: The above statement is only working for those employees with surname of . (dot). It's not working for first names of dot. How can I use the decode statement OR is there any other way of doing it without using the CASE statement?
    It seems my decode statement doesn't work with 2 different fields (surname, firstname) being tested within one decode statement.Thanks.

    Thank you so much InoL . I have used the ltrim with Replace but now have a new problem.
    Because I am joining Surname, First name and middle name together and put a comma after the Surname, the name now appears as follows:
    , Maria Ane (if Surname is a dot)
    Boiler, (if first name is a dot)
    I would like to get rid of a comma and only have comma when surname or first name does not have a dot, i.e. for those people with full names e.g. Blake, Anna Marie.
    InoL, how can I achieve this? Thanks.

Maybe you are looking for