A very basic query, Please help.

Hi all,
I am very new to java and need your help in getting rid of this error. Please help.
I have written two java files. packageTest.java and callPackageTest.java. Following is the code:
// packageTest.java
package aaa.bbb.ccc;
public class packageTest
     public packageTest()
          System.out.println("This is from inside package test constructor");
     public static void main(String[] args)
          packageTest obj1 = new packageTest();
          System.out.println("Hello World!");
//callPackageTest.java
import aaa.bbb.ccc.*; // there is a star at the end. Seems to get removed by the forum every time.
public class callPackageTest
     public static void main(String[] args)
          packageTest obj1 = new packageTest();
          System.out.println("Hello World!");
Now when I compile packageTest.java with the following command:
javac -d . packageTest.java
I get correct class file created in correct directory, i.e. aaa/bbb/ccc/packageTest.class.
But now when I try to compile the java file callPackageTest.java with the following command:
javac -cp . callPackageTest.java
I get the following error message:
class file contains wrong class.
Please remove or make sure it appears in the correct subdirectory of the classpath
I also observed that when I put the complete class name in the import statement in the file callPackageTest.java ( import aaa.bbb.ccc.packageTest; ) then there is no error. But I expect the same to be done when I write import aaa.bbb.ccc. * ( an star at the end)
Where is the mistake ? Please help.
Thanks in advance.
Sinha
Edited by: sinha_java on May 26, 2010 10:50 PM
Edited by: sinha_java on May 26, 2010 10:52 PM

Thanks guys for all the information about how to post and other forum related stuff. So here goes the formatted code.
I have written two java files. packageTest.java and callPackageTest.java. Following is the code:
// packageTest.java
package aaa.bbb.ccc;
public class packageTest
public packageTest()
System.out.println("This is from inside package test constructor");
public static void main(String[] args)
packageTest obj1 = new packageTest();
System.out.println("Hello World!");
//callPackageTest.java
import aaa.bbb.ccc.*;
public class callPackageTest
public static void main(String[] args)
packageTest obj1 = new packageTest();
System.out.println("Hello World!");
Now when I compile packageTest.java with the following command:
javac -d . packageTest.javaI get correct class file created in correct directory, i.e. aaa/bbb/ccc/packageTest.class.
But now when I try to compile the java file callPackageTest.java with the following command:
javac -cp . callPackageTest.javaI get the following error message:
class file contains wrong class.
Please remove or make sure it appears in the correct subdirectory of the classpath
I also observed that when I put the complete class name in the import statement in the file callPackageTest.java ( import aaa.bbb.ccc.packageTest; ) then there is no error. But I expect the same to be done when I write import aaa.bbb.ccc.*
Where is the mistake ?

Similar Messages

  • Some very basic problem PLEASE HELP ME :(

    hi,
    im just new to EJB's and WebLogic. i have integrated JBuilderX with BEAweblogic 8.1 and then made simplest ejb.
    started the server.
    server successfuly startedthen made test client and while running test client i got following error...
    "EJBModule.jar": Spaces in the temporary directory path may cause WebLogic APPC utility to produce fatal compile errors.
    "EJBModule.jar": Spaces in the classpath may cause WebLogic APPC utility to produce fatal compile errors.
    "EJBModule.jar": C:\bea\jdk142_04\bin\javaw -classpath "C:\bea\weblogic81\server\lib\weblogic_sp.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\Documents and Settings\Administrator\jbproject\ejbsess\EJBModule.jar;" weblogic.appc -keepgenerated -forceGeneration -compiler C:/bea/jdk142_04/bin/javac "C:/Documents and Settings/Administrator/jbproject/ejbsess/EJBModule.jar.jar" -output "C:/Documents and Settings/Administrator/jbproject/ejbsess/EJBModule.jar"
    AND
    "EJBModule.jar": <Nov 3, 2004 10:47:15 PM GMT+05:00> <Warning> <EJB> <BEA-010054> <EJB Deployment: WebLogicSes has a class ejbsess.WebLogicSesBean that is in the classpath. This class should only be located in the ejb-jar file.>
    "EJBModule.jar": <Nov 3, 2004 10:47:16 PM GMT+05:00> <Warning> <EJB> <BEA-010054> <EJB Deployment: WebLogicSes has a class ejbsess.WebLogicSesHome that is in the classpath. This class should only be located in the ejb-jar file.>
    "EJBModule.jar": <Nov 3, 2004 10:47:16 PM GMT+05:00> <Warning> <EJB> <BEA-010054> <EJB Deployment: WebLogicSes has a class ejbsess.WebLogicSes that is in the classpath. This class should only be located in the ejb-jar file.>
    "EJBModule.jar": [J2EE:160127]ERROR: Could not delete previous archive: C:\Documents and Settings\Administrator\jbproject\ejbsess\EJBModule.jar
    PLEASE HELP ME WAT TO DO....
    WAITING...
    :-(

    hi,
    i again made the whole thing with C:\project\weblogicsessproject
    i just simply made session bean and one method getMessage() which simply return String message.
    i compile that code and get following warning..
    "EjbsessModule.jar": Spaces in the temporary directory path may cause WebLogic APPC utility to produce fatal compile errors.
    then i run the server from JBuilder which runs correctly and gives the message to client that...
    <Nov 10, 2004 1:09:41 PM GMT+05:00> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>
    AND ON RUNNING TEST CLIENT OF JBUILDER I GET NAMING EXCEPTIONS...
    C:\bea\jdk142_04\bin\javaw -classpath "C:\project\weblogicsessproject\classes;C:\bea\weblogic81\server\lib\weblogic_sp.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\jdk142_04\jre\lib\charsets.jar;C:\bea\jdk142_04\jre\lib\ext\dnsns.jar;C:\bea\jdk142_04\jre\lib\ext\ldapsec.jar;C:\bea\jdk142_04\jre\lib\ext\localedata.jar;C:\bea\jdk142_04\jre\lib\ext\sunjce_provider.jar;C:\bea\jdk142_04\jre\lib\im\indicim.jar;C:\bea\jdk142_04\jre\lib\im\thaiim.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\plugin.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\sunrsasign.jar;C:\bea\jdk142_04\lib\dt.jar;C:\bea\jdk142_04\lib\htmlconverter.jar;C:\bea\jdk142_04\lib\tools.jar" weblogicsessproject.WebLogicSesTestClient1
    -- Initializing bean access.
    javax.naming.NameNotFoundException: Unable to resolve 'WebLogicSes' Resolved [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'WebLogicSes' Resolved ]; remaining name 'WebLogicSes'
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    -- Failed initializing bean access.
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at weblogicsessproject.WebLogicSesTestClient1.initialize(WebLogicSesTestClient1.java:34)
         at weblogicsessproject.WebLogicSesTestClient1.<init>(WebLogicSesTestClient1.java:19)
         at weblogicsessproject.WebLogicSesTestClient1.main(WebLogicSesTestClient1.java:270)
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'WebLogicSes' Resolved
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:230)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    IM DOING ALL THAT WITH HELP OF BORLAND WHITE PAPERS...
    please help me
    waiting

  • Problem while designing query please help

    Hi all,
    I have to query to find No of open cases, No of closed cases,
    Average of open cases, Average age of closed cases,
    Maximum of closed cases for a particulat Current assigne(char).
    my desired output is as follows.
    CurAssigne   Noofopencases   Noofclosed cases  Avgage(opencases) Max(open)
    CurAssigne1       10                      20                     8                              9
    CurAssigne1       18                      22                     9                              10
    My cube is consists of.
    4 Dimensions & 4 key figures
    4Dimensions are listed below.
    Business Partner{currentassigne, previousassigne,acmanager}
    createdon{createdonmonth,createdonday,createdtime}
    closedon{closedmonth,closedday,closedtime}
    Status{Latest case status-(2 status are available for each case - open,close)}
    above the objects between {} are chars.
    4 keys are listed below.
    no of cases.
    age
    first response time
    research time.
    Please help me to design this query friends..
    It's very urgent friends please help me.

    Hi,
    Please share your system configuration on which you are trying to install Ps CS6.
    Regards,
    Ashutosh
    Ps Installer QE

  • How to improve the performance of the attached query, Please help

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description                    Object_owner          Object_name     Cost     Cardinality     Bytes     
    SELECT STATEMENT, GOAL = ALL_ROWS                              14     1     13
    SORT AGGREGATE                                                  1     13
    VIEW                         GEMINI_REPORTING               14     1     13
    HASH GROUP BY                                        14     1     103
    NESTED LOOPS                                        13     1     103
    HASH JOIN                                             12     1     85
    TABLE ACCESS BY INDEX ROWID     GEMINI_REPORTING     RCAMSIT          2     4     100
    NESTED LOOPS                                        9     5     325
    HASH JOIN                                        7     1     40
    SORT UNIQUE                                        2     1     18
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          SITE          2     1     18
    INDEX RANGE SCAN          GEMINI_PRIMARY          SITE_I0          1     1     
    TABLE ACCESS FULL          GEMINI_PRIMARY          SITE          3     27     594
    INDEX RANGE SCAN          GEMINI_REPORTING     RCAMSIT_I     1     1     5     
    TABLE ACCESS FULL     GEMINI_PRIMARY     CAMPAIGN                    3     127     2540
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          CAMBILLING     1     1     18
    INDEX UNIQUE SCAN     GEMINI_PRIMARY     CAMBILLING_U1                    0     1

    Hello,
    This has really nothing to do with the Oracle Forms product.
    Please, send the SQL or/and PL/SQL questions in the corresponding forums.
    Francois

  • I connect my iphone 4g on charging after some time it is complete dead and very heat up please help me.

    i connect my iphone 4g on charging after some time it is complete dead and very heat up please help me.
    helllllllllllllllllpppppppeeeeeeeee me

    There is no such thing as an iPhone 4G.

  • What is the deal.  I'm trying to request service for my Ipod and everytime I go through everything and submit it, it says "Sorry we can't process your request at this time..."  I have tried numerous times and am getting very frustrated.  Please help.

    What is the deal?  I'm trying to request service for my ipod touch and every time I go through everything and submit it, it says "Sorry we can't process your request at this time..."  I'm getting very frustrated. Please help.

    Thanks for the detail.
    I believe you are doing your best, in the right place.  How long have you tried ?
    May be the sistem in your area is really busy. Can you wait few hours or contact them with a Message ?
    Or try a Service provider http://support.apple.com/kb/HT1434

  • I recently lost and tracked down my iPhone (4s) w/find my iPhone. It was awesome! When I recovered it, my touch screen didn't work at all! What's going on? I'm very frustrated! Please help:(

    I recently lost and tracked down my iPhone (4s) w/find my iPhone. It was awesome! When I recovered it, my touch screen didn't work at all! What's going on? I'm very frustrated! Please help:(

    imanfromsweden wrote:
    Please apple support do you people have a convincing answer for us? Is there a solution? My phone is only 2 years old and was (2 hours ago), in top condition!!
    Please help....
    On belhalf of my fellow volunteers, the answer is, "We'll try our best." 
    My advice is to try not to treat this like it is a paid service provided by compensated professionals.  Ask nicely and one of the nice folks here might take some time out of their weekend to offer advice.

  • I can't watch Dailymotion videos on my iPad but can do so on my iPhone and PC. Very strange. Please help !

    I can't watch Dailymotion videos on my iPad but can do so on my iPhone and PC. Very strange. Please help !

    Take it to an Apple store genius bar to have the techs see what your options are for repair/replacement.  An out-of-warranty replacement is $149 in the US for the iPhone 4.

  • PROBLEM WITH HIERARCHICAL QUERY - PLEASE HELP

    I have got three tables :
    CREATE TABLE FIRM
    (FID INTEGER NOT NULL PRIMARY KEY,
    FNAME VARCHAR(40),
    FTYPE VARCHAR(3),
    MASTERID INTEGER );
    CREATE TABLE FACULTY
    (FAID INTEGER NOT NULL PRIMARY KEY,
    FANAME VARCHAR(40),
    FATYPE VARCHAR(3),
    MASTERID INTEGER );
    CREATE TABLE EMPLOYEE
         (EID INTEGER NOT NULL PRIMARY KEY,
    ENAME VARCHAR(20),
    ESURNAME VARCHAR(20),
         EJOB VARCHAR(3),
         MASTERID INTEGER );
    This is a hierarchical tree(or is ment to be, I,m complete rookie ) . Firm can be the root or can be slave to another firm. Faculty can be slave to firm, or to another faculty. Employee can be slave to faculty or to another employee(e.g. boss). This connections are specified by MASTERIDs.
    I need to write a procedure, which parameter would be node ID. It is meant to create a VIEW from this node as if it was a root (view of a subtree).
    I tried CONNECT BY clause but it works only on one table at a time and I have here three tables.
    I completely don,t know how to write it. Please help.

    create view hierarchy as
    select id, master_id, name from table1
    union all
    select id, master_id, name from table2
    union all
    select id, master_id, name from table3
    Then do your connect by query against hierarchy.
    It will not work in 8i (connect by on views not allowed), so you will need to materialize the view.
    Kirill

  • Problem in HTMLB :(  Very very very URGENT..Please help

    Hello All,
    I have a problem in HTMLB.
    <u>Scenario</u>:
    1. Am implementing a JSP DynPage Portal Component.
    2. Have a class called "BeanOrderDetails", which consists of an Object table and mapped fields like ModelNo, Qty, etc as the Column Names in this class.
    3. The class using JSPDynpage is called "NewOrder.java".
    This class instantiates the above bean class and calls a jsp file calls "NewOrder.jsp".
    4. NewOrder.jsp - uses HTMLB taglib style. consists of a form and set its layout to GridLayout. It further calls another JSP file which consists of all other GUI objects, called "i1_NewOrder.jsp".
    5. i1_NewOrder.jsp - creates instances of GUI Objects like InputField,etc and adds these instances to the GridLayoutCell.
    Question:
    i> I have to create a button called "Add NewLine" such that when the user clicks on it, an empty row should be automatically generated in the above table, which is created as in step 1.
    Where should I add this button and where would the event be handled?
    Please help. URGENT......
    Awaiting Reply.
    Thanks and Warm Regards,
    Ritu

    Hi Ritu,
    I had a very similar problem. The default TableViewModel does not support adding rows at runtime. You have to extend the TableViewModel for this - don't worry it is easier as it sounds.
    Look here for the solution which was given to me by Detlev Beutner:
    How to add a row in TableViewModel?
    I hope this helps.
    Best regards
    Francisco

  • How to make recursive query.Please help

    Dear Experts:
    I want to retrieve all employees located in a department in addition to all other employees located in the child's nodes of this department too.
    Problem Details:
    I have "Employees" table and "Departments" Table
    The structure of Dept Table is:
    ID   primary key
    parent_dept   foreign key(id)
    deptname  varchar2
    deptType varchar2
    The Employee table structure is
    ID primary key
    dept_id foreign key(Department.id)
    empName varchar2Sample data for departments
    ID : 1
    parent_dept : null
    deptname: General Manager office
    deptType : 'GM'
    ID :=2
    parent_dept : 1
    deptname: Information tech.
    deptType : 'DPT'
    ID :=3
    parent_dept : 2
    deptname: Software Development
    deptType : 'SECTION'Sample Data for employees
    ID : 101
    dept_id  :1
    empName  King
    ID : 102
    dept_id  :2
    empName  ALAN
    ID : 103
    dept_id  :2
    empName  SAM
    ID : 104
    dept_id  :3
    empName  JANEI want to create a query that accepts a parameter "p_department_id" and returns All employees on the following conditions
    1- In case the parameter value is null , then retrieve All Employees "king - alan- sam-jane"
    2- In Case the parameter value is 1 , then retrieve all the employees under department id =1 in addition to all the employees located under the children departments.
    in this case it will be "king - alan- sam-jane"
    3- In case parameter value is 2 , then return all the employees under department id =2 in addition to all the employees located under the children departments.
    In this case it will be " alan- sam-jane"
    4- In case parameter value is 3 , then return all the employees under department id =3 in addition to all the employees located under the children departments.
    in this case it will be only "JANE"
    In brief , If I pass any value to the parameter :p_department_id , I want to retrieve all employees located in this department in addition to other employees located in the child's nodes of this department id
    I use oracle database 11g release 2
    Please help me
    Thanks
    Edited by: ta**** on Apr 3, 2013 5:56 PM
    Edited by: ta**** on Apr 3, 2013 5:58 PM

    SQL> variable p_department_id number
    SQL> exec :p_department_id := null
    PL/SQL procedure successfully completed.
    SQL> with employees as (
      2                     select 101 id,1 dept_id,'King' empName from dual union all
      3                     select 102,2,'ALAN' from dual union all
      4                     select 103,2,'SAM' from dual union all
      5                     select 104,3,'JANE' from dual
      6                    ),
      7     departments as (
      8                     select 1 id,null parent_dept,'General Manager office' deptname,'GM' deptType from dual union all
      9                     select 2,1,'Information tech.','DPT' from dual union all
    10                     select 3,2,'Software Development','SECTION' from dual
    11                    )
    12  select  *
    13    from  employees
    14    where dept_id in (
    15                      select  id
    16                        from  departments
    17                        start with (
    18                                       (
    19                                            :p_department_id is null
    20                                        and
    21                                            parent_dept is null
    22                                       )
    23                                    or
    24                                       id = :p_department_id
    25                                   )
    26                        connect by parent_dept = prior id
    27                     )
    28  /
            ID    DEPT_ID EMPN
           101          1 King
           102          2 ALAN
           103          2 SAM
           104          3 JANE
    SQL> exec :p_department_id := 1
    PL/SQL procedure successfully completed.
    SQL> /
            ID    DEPT_ID EMPN
           101          1 King
           102          2 ALAN
           103          2 SAM
           104          3 JANE
    SQL> exec :p_department_id := 2
    PL/SQL procedure successfully completed.
    SQL> /
            ID    DEPT_ID EMPN
           102          2 ALAN
           103          2 SAM
           104          3 JANE
    SQL> exec :p_department_id := 3
    PL/SQL procedure successfully completed.
    SQL> /
            ID    DEPT_ID EMPN
           104          3 JANE
    SQL> SY.

  • SQL Query -- Please Help

    Table1
    QTE_ID     SEQ_NO
    1435177     2
    1435177     5
    1435177     7
    1435177     8
    1435177     12
    1435177     14
    Table2
    QTE_ID     SEQ_NO     CMMT_CURR_AMT
    1435177     1     98500
    1435177     2     98500
    1435177     3     0
    1435177     4     98500
    1435177     5     98500
    1435177     7     98500
    1435177     8     98500
    1435177     11     59300
    1435177     12     59300
    1435177     14     59300
    The result should be
    QTE_ID     SEQ_NO     CMMT_CURR_AMT
    1435177     2     0 (where 0 = cmmt_curr_amt of seq 2 - cmmt_curr_amt of seq 1 from table 2)
    1435177     5     0 (where 0 = cmmt_curr_amt of seq 5 - cmmt_curr_amt of seq 4 from table 2)
    1435177     7     0 (where 0 = cmmt_curr_amt of seq 7 - cmmt_curr_amt of seq 5 from table 2)
    1435177     8     0 (where 0 = cmmt_curr_amt of seq 8 - cmmt_curr_amt of seq 7 from table 2)
    1435177     12     0 (where 0 = cmmt_curr_amt of seq 12 - cmmt_curr_amt of seq 11 from table 2)
    1435177     14     0 (where 0 = cmmt_curr_amt of seq 14 - cmmt_curr_amt of seq 12 from table 2)
    I have to get the difference of cmmt_curr_amt from the table2 from seq 14 to seq 12 for seq14 in table 1.
    Please help me in writing the query.
    Thanks in advance.
    Srinivas

    WITH table1 AS
    (SELECT 1435177 qte_id, 2 seq_no
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 5 seq_no
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 7 seq_no
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 8 seq_no
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 12 seq_no
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 14 seq_no
    FROM dual
    table2 AS
    SELECT 1435177 qte_id, 1 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 2 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 3 seq_no, 0 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 4 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 5 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 7 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 8 seq_no, 98500 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 11 seq_no, 59300 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 12 seq_no, 59300 cmmt_curr_amt
    FROM dual
    UNION ALL
    SELECT 1435177 qte_id, 14 seq_no, 59300 cmmt_curr_amt
    FROM dual
    SELECT qte_id, t2_seq_no, cmmt_curr_amt - cmmt_curr_lag diff
    FROM
    (SELECT t2.qte_id, t2.seq_no t2_seq_no, t1.seq_no t1_seq_no, cmmt_curr_amt, LAG(cmmt_curr_amt,1,0) OVER (PARTITION BY t2.qte_id ORDER BY t2.seq_no) cmmt_curr_lag
    FROM table1 t1, table2 t2
    WHERE t2.qte_id = t1.qte_id (+)
    AND t2.seq_no = t1.seq_no(+)
    ORDER BY 1,2
    WHERE t1_seq_no IS NOT NULL
    ORDER BY 1,2
    QTE_ID T2_SEQ_NO DIFF
    1435177 2 0
    1435177 5 0
    1435177 7 0
    1435177 8 0
    1435177 12 0
    1435177 14 0

  • How to rewrite this query without sub query please help me

    Hello All Good Evening,
    Could you please help me with this query, how can i write this query without sub query, or how can write this query another ways
    please help me
    select planno, status1, count(*) Counts from
    select a.ValetNO PlanNo  ,
    case 
         when JoinCode in ('00', '01', '02') then 'Actcess'
         when JoinCode in ('20', '21', '22', '23','38', '39') then
         'Secured' else 'Other' end Status1 ---, COUNT (*)
       from  dbo.ppt a(NOLOCK)  left join dbo.acts b on a.P_ID = b.P_ID and a.ValetNO  = b.ValetNO
    --group by a.ValetNO
      a group by planno, status1
    order by 2
    Thank you in Advance
    Milan

    Whats your objective here? Sorry, am not able to understand the reason for this change. 
    Try the below:(Not tested)
    ;With cte
    As
    select a.ValetNO PlanNo ,
    case
    when JoinCode in ('00', '01', '02') then 'Actcess'
    when JoinCode in ('20', '21', '22', '23','38', '39') then
    'Secured' else 'Other' end Status1 ---, COUNT (*)
    from dbo.ppt a(NOLOCK) left join dbo.acts b on a.P_ID = b.P_ID and a.ValetNO = b.ValetNO
    select planno, status1, count(*) Counts from cte
    a group by planno, status1
    order by 2
    Even below:
    select a.ValetNO PlanNo ,
    case
    when JoinCode in ('00', '01', '02') then 'Actcess'
    when JoinCode in ('20', '21', '22', '23','38', '39') then
    'Secured' else 'Other' end Status1 , COUNT (1)
    from dbo.ppt a(NOLOCK) left join dbo.acts b on a.P_ID = b.P_ID and a.ValetNO = b.ValetNO
    Group by a.ValetNO ,
    case
    when JoinCode in ('00', '01', '02') then 'Actcess'
    when JoinCode in ('20', '21', '22', '23','38', '39') then
    'Secured' else 'Other' end

  • Passing parameter to a SQL query - Please help

    Hi All,
    I am new to JDBC. I have been trying to pass an external variable to an SQL Query.
    The query is
    String username1="le";
    PreparedStatement pstmt = null;
    pstmt = c.prepareStatement("select * from users where USER_NAME like '%?%'");
         pstmt.setString(1, username1);
         pstmt.executeQuery();
         ResultSet rs = pstmt.getResultSet();
    I am trying to retrieve values from the users table where the USER_NAME column value that is a String contains the supplied value username1.
    I am using the question mark (?) character to pass the value from the variable username1. I am also using the '%' substitution character which matches for any number of characters. So, the above query should retrieve rows where the USER_NAME is something like "charles","leander","Elena" etc.( that contains "le")
    I am getting the error:
    SQLException: java.sql.SQLException: ORA-01006: bind variable does not exist
    I changed the query to
    PreparedStatement pstmt = null;
    pstmt = c.prepareStatement("select * from users where USER_NAME like '% " + username1 + "%'");
         //pstmt.setString(1, username1);
         pstmt.executeQuery();
    This time , it is not giving the error and retrieving properly.
    But I want to use the original query and use the "pstmt.setString(1, username1); " . Is there any way of achieving this?
    Please help.
    Cheers,
    charles_am

    hi,
    try this...
    String username1="%le%";
    pstmt = c.prepareStatement("select * from users where USER_NAME like ?")
    pstmt.setString(1,username1);
    cheers,
    rpk

  • MacBook Pro suddenly very slow! PLEASE HELP!

    Hi!
    this is my ever post and im not much of an expert so please excuse if im slow or say sth stupid
    so i have a macbook pro 2011 with an i7 which should be pretty fast. and it was until 5-6 months ago, where it just became terribly slow, i re-installed the OSX, but it didnt help.
    my battery has also died completely last month, which i will have to change, and i will add an extra 4 GB RAM i think, but i doubt thats the only issue.
    applications are ridiculuosly slow, i get the beachball of death all the time, please help.
    i runa an EthreCheck, here is the result if it helps:
    Thank you very much in advance!
    EtreCheck version: 2.1.5 (108)
    Report generated 5 January 2015 16:16:31 CET
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Early 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.7 GHz Intel Core i7 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10 (14A389) - Uptime: 0:51:52
    Disk Information: ℹ️
      TOSHIBA MK5065GSXF disk0 : (500.11 GB)
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) / : 498.88 GB (142.50 GB free)
      Encrypted AES-XTS Unlocked
      Core Storage: disk0s2 499.25 GB Online
      OPTIARC DVD RW AD-5970H 
    USB Information: ℹ️
      Apple Computer, Inc. IR Receiver
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. FaceTime HD Camera (Built-in)
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Library/Application Support/Avast/components/fileshield/unsigned
      [loaded] com.avast.AvastFileShield (2.1.0 - SDK 10.9) [Support]
      /Library/Application Support/Avast/components/proxy/unsigned
      [loaded] com.avast.PacketForwarder (2.0 - SDK 10.9) [Support]
    Launch Agents: ℹ️
      [loaded] com.avast.userinit.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [invalid?] com.intego.commonservices.statusitem.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [loaded] com.trusteer.rapport.rapportd.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [loaded] com.avast.init.plist [Support]
      [loaded] com.avast.uninstall.plist [Support]
      [failed] com.avast.update.plist [Support]
      [not loaded] com.google.keystone.daemon.plist [Support]
      [not loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [not loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
      [not loaded] com.trusteer.rooks.rooksd.plist [Support]
    User Launch Agents: ℹ️
      [invalid?] com.avast.home.userinit.plist [Support]
      [loaded] com.facebook.videochat.[redacted].plist [Support]
      [loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist [Support]
      [loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist [Support]
    User Login Items: ℹ️
      iTunesHelper UNKNOWN (missing value)
      Dropbox UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      JavaAppletPlugin: Version: Java 8 Update 25 Check version
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Default Browser: Version: 600 - SDK 10.10
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      QuickTime Plugin: Version: 7.7.3
      o1dbrowserplugin: Version: 5.4.2.18903 [Support]
      SharePointBrowserPlugin: Version: 14.4.6 - SDK 10.6 [Support]
      googletalkbrowserplugin: Version: 5.4.2.18903 [Support]
      Silverlight: Version: 5.1.20513.0 - SDK 10.6 [Support]
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
    Safari Extensions: ℹ️
      Searchme [Installed] Adware! [Remove]
      Better Pop Up Blocker [Installed]
      wrc [Installed]
      Slick Savings [Installed] Adware! [Remove]
      Frill [Installed]
      Amazon Shopping Assistant [Installed] Adware! [Remove]
      AdBlock [Installed]
      Adblock Plus [Installed]
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
      Trusteer Endpoint Protection  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          14% Mail
          3% Google Chrome
          2% WindowServer
          2% coreaudiod
          1% launchd
    Top Processes by Memory: ℹ️
      120 MB Google Chrome
      107 MB Microsoft Word
      94 MB Google Chrome Helper
      86 MB Mail
      69 MB mds_stores
    Virtual Memory Information: ℹ️
      18 MB Free RAM
      983 MB Active RAM
      1.44 GB Inactive RAM
      1.07 GB Wired RAM
      6.10 GB Page-ins
      72 MB Page-outs
    Diagnostics Information: ℹ️
      Jan 5, 2015, 03:29:00 PM /Library/Logs/DiagnosticReports/NotificationCenter_2015-01-05-152900_[redacted] .cpu_resource.diag [Details]
      Jan 5, 2015, 03:25:19 PM Self test - passed
      Jan 5, 2015, 10:48:18 AM /Library/Logs/DiagnosticReports/systemstats_2015-01-05-104818_[redacted].cpu_re source.diag [Details]
      Jan 5, 2015, 10:26:04 AM /Library/Logs/DiagnosticReports/rpcsvchost_2015-01-05-102604_[redacted].cpu_res ource.diag [Details]
      Jan 5, 2015, 10:20:48 AM /Library/Logs/DiagnosticReports/NotificationCenter_2015-01-05-102048_[redacted] .cpu_resource.diag [Details]
      Jan 4, 2015, 06:55:43 PM /Library/Logs/DiagnosticReports/rpcsvchost_2015-01-04-185543_[redacted].cpu_res ource.diag [Details]
      Jan 4, 2015, 02:44:46 PM /Library/Logs/DiagnosticReports/com.avast.daemon_2015-01-04-144446_[redacted].c pu_resource.diag [Details]
      Jan 4, 2015, 11:46:00 AM /Library/Logs/DiagnosticReports/systemstats_2015-01-04-114600_[redacted].cpu_re source.diag [Details]
      Jan 4, 2015, 11:19:22 AM /Library/Logs/DiagnosticReports/rpcsvchost_2015-01-04-111922_[redacted].cpu_res ource.diag [Details]
      Jan 3, 2015, 06:20:32 PM /Users/[redacted]/Library/Logs/DiagnosticReports/UserKernel_2015-01-03-182032_[ redacted].crash
      Jan 3, 2015, 04:27:19 PM /Users/[redacted]/Library/Logs/DiagnosticReports/LeagueofLegends_2015-01-03-162 719_[redacted].crash
      Jan 3, 2015, 02:12:22 AM /Users/[redacted]/Library/Logs/DiagnosticReports/LolClient_2015-01-03-021222_[r edacted].crash
      Jan 3, 2015, 12:02:38 AM /Users/[redacted]/Library/Logs/DiagnosticReports/UserKernel_2015-01-03-000238_[ redacted].crash
      Jan 3, 2015, 12:02:37 AM /Users/[redacted]/Library/Logs/DiagnosticReports/LeagueofLegends_2015-01-03-000 237_[redacted].crash
      Jan 2, 2015, 09:38:20 PM /Users/[redacted]/Library/Logs/DiagnosticReports/LeagueofLegends_2015-01-02-213 820_[redacted].crash
      Jan 2, 2015, 05:44:54 PM /Users/[redacted]/Library/Logs/DiagnosticReports/UserKernel_2015-01-02-174454_[ redacted].crash
      Jan 2, 2015, 05:44:48 PM /Users/[redacted]/Library/Logs/DiagnosticReports/LoLPatcher_2015-01-02-174448_[ redacted].crash
      Jan 2, 2015, 05:04:53 PM /Library/Logs/DiagnosticReports/mdworker_2015-01-02-170453_[redacted].cpu_resou rce.diag [Details]
      Jan 2, 2015, 05:04:20 PM /Library/Logs/DiagnosticReports/com.avast.daemon_2015-01-02-170420_[redacted].c pu_resource.diag [Details]

    Rapport software is offered by banks as a security support software.
    Uninstall Trusteer software
    http://www.trusteer.com/support/uninstalling-rapport-mac-os-x
    YouTube video
    http://www.youtube.com/watch?v=Oxz-EW8Gceo
    Remove Avast:
    http://apple-macintoshsupport.blogspot.com/2012/07/how-do-i-uninstall-avast-free -antivirus.html

Maybe you are looking for

  • Poor PXI IO performanc​e on Latitude E6410 with ExpressCar​d 8360

    Hello, I have a Dell Latitude E6410 with a Core-i5 M520 which is giving me very poor io performance when using an ExpressCard 8360 card to connect to a PXI Rack. The sustained IO rate that I can get appears to be about 1/3 of that that I can get usin

  • For Oracle : When will Oracle's JDBC Driver work for Date ?

    I try to develop an application that will run on every database. The only Database I have a problem with is Oracle because of date : I can't use executeQuery or executeUpdate with sql request that use a date field as a parameter. And this stupid issu

  • Populating Database values into a combo box in STRUTS Framework

    Hi Guys, I am currently working on a STRUTS Framework project and I can't get much resources related to the problems that I'm facing. Currently I need to populate a JSP file's Combo box with database values. What I don't know here is the syntax used

  • TUXEDO 8.1 Patches

    Can somebody tell me where I can get the latest patches from for TUXEDO 8.1 running on AIX5.2 please? (In a hurry) TIA Nige...

  • UWL Workitems from different Systems in a sequence

    Hi , is it possible to show UWL items in a sequence from different systems. I mean if i have a workitem   xx coming from system ABC and another YY coming from DEF it must appear in UWL as xx YY Please let me know is it possible and what is the proced