Help me to understand this simple program..

Below coding cannot be compiled...please help me
public class demo{
private String employeeName;
public static void main(String args[]) {
System.out.println("Hello, World");
employeeName = "Jeremy";
showMessage("Employee:");
static void showMessage(String msg) {
int i;
System.out.println(msg+ " " +employeeName);
}

When posting code, make sure you use the CODE tags to preserve highlighting. Otherwise nobody will read it.
Also, if you have errors, tell us what they are! Copy the whole error message here, and point out which line numbers are mentioned in the error.
At first glance though, you should learn exactly what "static" means in a Java program.

Similar Messages

  • Pls help to understand this routine program

    Pls help to understand this routine program written in transformation level for a field.
    Data a Type /bic/oizsnote_2.
    Data: l_len type i,
          l_time type i.
    Move source_fields-zztdline+60(60) TO a.
    l_len = STRLEN(a).
    DO l_len TIMES.
    IF a+l_time(1) CN
    ',<>?/:;"''ABCDEFGHIJKLMNOPQTRSTUVWXYZ abcdefghijklmnopqrstuvwxyz!%^&' & '*' & "()__+=12346567890'
    a+l_time(1) = '~'.
    Endif.
    l_time = l_time + 1.      
    enddo.
    replace all occurrences of '~' in a with space.
    Result = a.
    not having much exposure in ABAP programming.
    Raj

    In addition to the above to posts..
    HI Raj,
    Your routine is used to remove the invalid characters.
      IF  A+l_time(1)  CN
    A is a Char which contains the data .*
      I_time is used for iteration(itu2019ll check each char by char in a word/Sentence).
    *CN u2013 Contains not
    ,?/:;"''ABCDEFGHIJKLMNOPQTRSTUVWXYZ abcdefghijklmnopqrstuvwxyz!%^&' & '*' & "()__+=12346567890.
    These are the Valid chars and numbers which will be accepted by BW system, System will throw an error only when load receives a char which is not there in the above. And that char will be treated as a Invalid Char.
    A+l_time(1) = '~'.
    What ever the special/Invalid char appears in the load apart from the above mentioned, system will convert  them to u2018~u2019
    REPLACE ALL OCCURRENCES OF '~' IN a WITH space.
       CONDENSE A.
    System will replace all the ~ with space, then condenses the space.
    You can do this using RSKC transaction instead of going for routine.

  • Left outer join VS Is NULL .. Please help me to understand this.

    Hi Experts,
    I have a requirement to use Leftouter join on a column. But unfortunately i couldnt implement this in OBIEE. so instead iam using = and is NULL condition. kindly help me to understand this or give me a solution.
    Advance Thanks
    I am pasting the query here. look at the last line of the query there i want to modify.
    select Targ.organization_id,Targ.cycle_count_header_name,Targ.cycle_count_header_id,Targ.cc_class_name
    ,Targ.total_cycle_count_per_month,NVL(Act.Actual_count,0)actual_count,targ.month_year,Act.count_stat,targ.year count_date_current,length(act.count_status) count_status,nvl(length(act.count_status),0)
    from
    (select
      Dim_date.Year,
    Dim_date.month_year,
    target.organization_id,
                             target.cycle_count_header_name,
                             target.cycle_count_header_id,
                             target.abc_class_id,
                             target.CC_class_name,
                            target.inventory_item_id_count,
                          target.cycle_count_per_year,
                            target.total_cycle_count_per_year,
                  target.total_cycle_count_per_month                       
    from
    (SELECT DISTINCT
                   TO_NUMBER (TO_CHAR (count_date_current, 'yyyy'), '9999') Year,
                    TO_CHAR (count_date_current, 'MON-YYYY') month_year
              FROM mtl_cycle_count_entries_v)Dim_date,
    (SELECT mth.organization_id,
                             mth.cycle_count_header_name,
                             mth.cycle_count_header_id,
                             mtc.abc_class_id,
                             mtc.CC_class_name,
                             COUNT (mti.inventory_item_id) inventory_item_id_count,
                             MIN (mtc.num_counts_per_year) cycle_count_per_year,
                             COUNT (mti.inventory_item_id)
                             * MIN (mtc.num_counts_per_year)
                                total_cycle_count_per_year,
                             ROUND (
                                (COUNT (mti.inventory_item_id)
                                 * MIN (mtc.num_counts_per_year))
                                / 12)
                                total_cycle_count_per_month,
                                TO_NUMBER (TO_CHAR (mth.creation_date, 'yyyy'), '9999') Year
                        FROM mtl_cycle_count_headers_v mth,
                             mtl_cycle_count_items_v mti,
                             mtl_cycle_count_classes_v mtc
                       WHERE mth.cycle_count_header_id = mti.cycle_count_header_id
                             AND mth.cycle_count_header_id = mtc.cycle_count_header_id
                             AND mth.organization_id = mtc.organization_id
                             AND mtc.abc_class_id = mti.abc_class_id
                              GROUP BY mth.organization_id,
                             mth.cycle_count_header_id,
                             mth.cycle_count_header_name,
                             mtc.abc_class_id,
                             mtc.CC_class_name,
                             TO_NUMBER (TO_CHAR (mth.creation_date, 'yyyy'), '9999')
                             ) Target
                                    where dim_date.Year=Target.Year) Targ,
                                  (SELECT --TRUNC (count_date_current) count_date_current,
                             TO_CHAR (count_date_current, 'MON-YYYY') Month_year,
                             abc_class_name,
                             count_status count_stat,
                             organization_id,
                             cycle_count_header_id,
                             count_status,
                             SUM (NUMBER_OF_COUNTS) Actual_count
                        FROM MTL_CYCLE_COUNT_ENTRIES_V
                    GROUP BY organization_id,
                             --TRUNC (count_date_current),
                             cycle_count_header_id,
                             TO_CHAR (count_date_current, 'MON-YYYY'),
                             abc_class_name,
                             count_status)Act
                           WHERE act.cycle_count_header_id(+) = targ.cycle_count_header_id
                   AND act.organization_id(+) = targ.organization_id
                   AND act.abc_class_name(+) = targ.cc_class_name
                    AND act.Month_year(+)=targ.month_year
                    AND targ.organization_id=254
                            AND targ.Cycle_count_header_id=3026
                             AND targ.CC_CLASS_NAME= 'A PARTS'
                             and act.count_status (+)='Rejected'I need to replace the final line act.count_status(+)='Rejected' with
    (act.count_status='Rejected' and act.count_status is NULL)But i am getting difference in data. what might be the reason?.. I am a naive user to oracle. Kindly help me and any help will be appreciated.
    Thanks alot.

    Data set for both i am enclosing here. Kindly have a look in to that.
    254     OPSCAST0909     3026     A PARTS     7     1     Dec-09     Rejected     2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Feb-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Sep-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jul-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     May-09          2009          Data Set for outer join          
    254     OPSCAST0909     3026     A PARTS     7     0     Oct-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jun-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jan-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Nov-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Apr-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Aug-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Mar-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     1     Dec-09     Rejected     2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Feb-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jul-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     May-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jun-09          2009          Data set of IS NULL          
    254     OPSCAST0909     3026     A PARTS     7     0     Jan-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Apr-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Aug-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Mar-09          2009                    

  • Can anybody help me to understand this RMI registry service code?

    RMI is so difficult to me. please let me know following code what it means.
    If this class is instantiated with 50000 port number,
    Does RMI Registry Service get started with 50000 port number in place of rmiregistry commands?
    And I don't have to execute rmiregistry command?
    thanks in advance.
    import java.rmi.AccessException;
    import java.rmi.AlreadyBoundException;
    import java.rmi.NotBoundException;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.rmi.registry.Registry;
    import java.rmi.server.ObjID;
    import java.rmi.server.RemoteServer;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import sun.rmi.server.UnicastServerRef;
    import sun.rmi.transport.LiveRef;
    * Registry implementation.
    * @version 1.0
    public class RegistryImpl extends RemoteServer implements Registry {
         private static final long serialVersionUID = -7162736590129110751;
         private Hashtable bindings;
        private static ObjID id = new ObjID(0);
         * @param i port number
         * @throws RemoteException
        public RegistryImpl(int i) throws RemoteException {
            bindings = new Hashtable(101);
            LiveRef liveref = new LiveRef(id, i);
            setup(new UnicastServerRef(liveref));
        private void setup(UnicastServerRef unicastserverref) throws RemoteException {
            super.ref = unicastserverref;
            unicastserverref.exportObject(this, null, true);
         * Lookup a remote object.
         * @param name Name of the remote object.
         * @return Remote object of the specified name.
        public Remote lookup(String name) throws RemoteException, NotBoundException {
    //        Logger.debug("NamingService", "lookup: " + name);
            Remote obj;
            synchronized(bindings) {
                obj = (Remote)bindings.get(name);
                if(obj == null)
                    throw new NotBoundException(name);
            return obj;
         * Binds the specified name to a remote object.
         * @param name A URL-formatted name for the remote object.
         * @param obj A reference for the remote object (usually a stub).
        public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException {
    //        Logger.debug("NamingService", "bind: " + name);
            checkAccess("Registry.bind");
            synchronized(bindings) {
                if(bindings.containsKey(name))
                    throw new AlreadyBoundException(name);
                bindings.put(name, obj);
         * Destroys the binding for the specified name that is associated with a remote object.
         * @param name A URL-formatted name for the remote object.
        public void unbind(String name) throws RemoteException, NotBoundException, AccessException {
    //        Logger.debug("NamingService", "unbind: " + name);
            checkAccess("Registry.unbind");
            synchronized(bindings) {
                if(!bindings.containsKey(name))
                    throw new NotBoundException(name);
                bindings.remove(name);
         * Rebinds the specified name to a new remote object. Any existing binding
         * for the name is replaced.
         * @param name A URL-formatted name for the remote object.
         * @param obj A reference for the remote object (usually a stub).
        public void rebind(String name, Remote obj) throws RemoteException, AccessException {
    //        Logger.debug("NamingService", "rebind: " + name);
            checkAccess("Registry.rebind");
            bindings.put(name, obj);
         * Returns an array of the names bound in the registry.
         * @return An array of the names bound in the registry.
        public String[] list() throws RemoteException {
            String[] names;
            synchronized(bindings) {
                int i = bindings.size();
                names = new String;
    Enumeration e = bindings.keys();
    while(--i >= 0)
    names[i] = (String)e.nextElement();
    return names;
    * TO-DO
    public static void checkAccess(String s) throws AccessException {
    // check if s is in the list of agents.
    if(true)
    else
    throw new AccessException("");
    public static ObjID getID() {
    return id;

    You don't have any need to understand this code. The complication is due to the registry needing a fixed objectID.
    You just need to know the methods of java.rmi.registry.LocateRegistry class. This allows you to start an RMI Registry inside your JVM and give it any TCP port number you like.

  • I don't understand why this simple program will not print.  Help please!!!

    This program runs with no errors, it just doesn't print anything. Anyone have a clue as to why it doesn't print anything?
    Here is my code:
    import javax.swing.JOptionPane;
    public class Converter {
    public static void main(String[] args) {
    int a,b,c;
    int inputNum=Integer.parseInt(JOptionPane.showInputDialog(null," Enter a length in yards: "));
    String measurement = JOptionPane.showInputDialog(null,"Enter the unit of conversion (inches, feet, or centiyards): ");
    if (measurement == "inches"){
    a = inputNum*36;
    System.out.println(a + "inches");
    else if (measurement == "feet"){
    b = inputNum*3;
    System.out.println(b + "feet");
    else if (measurement == "centiyards"){
    c = inputNum*100;
    System.out.println(c + "centiyards");
    }

    Don't confuse String's equals() method with the equality operator '=='. The == operator checks that two references refer to the same object. If you want to compare the contents of Strings (whether two strings contain the same character sequence), use equals(), e.g. if (str1.equals(str2))...
    Example:String s1 = "foo";
    String s2 = new String("foo");
    System.out.println("s1 == s2: " + (s1 == s2)); // false
    System.out.println("s1.equals(s2): " + (s1.equals(s2))); // trueFor more information, check out the Java FAQ
    ~

  • Pls find out the exception in this simple program...

    Pls tell me wots the reason of the exception in this program since im getting an exception like this..
    Exception is thread "main" java.lang.NoClassDefFoundError: derived
    Program is the following:-
    class base {
    public base() {
    System.out.println("BASE CLASS DEFAULT CONSTRUCTOR");
    public base(int i) {
    System.out.println("inside base i");
    public class derived extends base {
    public static void main(String args[]) {
    derived obj=new derived();
    derived() {
    System.out.println("Derived class constructor");
    derived(int i) {
    System.out.println("inside derived i");
    Pls help me...

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Can't understand this thread program.

    Hi ..this is a part of program from http://java.sun.com/docs/books/tutorial/essential/concurrency/simple.html ..I dnt understand the last block in the following program,the one starting from "if (args.length > 0) { ......."
    can somebody tell why is it used?
    public static void main(String args[]) throws InterruptedException {
            //Delay, in milliseconds before we interrupt MessageLoop
            //thread (default one hour).
            long patience = 1000 * 60 * 60;
            //If command line argument present, gives patience in seconds.
            if (args.length > 0) {
                try {
                    patience = Long.parseLong(args[0]) * 1000;
                } catch (NumberFormatException e) {
                    System.err.println("Argument must be an integer.");
                    System.exit(1);
            }

    Well it says in the code comments:
    //Delay, in milliseconds before we interrupt MessageLoop
            //thread (default one hour).So I am guessing that that is the delay period, but the snippet of code you pasted actually does nothing except set a value patience and then look for a command line argument and if it exists attempts to set patience to that value.

  • Help me to run this simple RMI example

    When i m running this example in standalone pc it works but while running on to different pc it gives error though I m giving the IP address from client of server.. If anyone can help me out plz help.
    Code:
    ReceiveMessageInterface
    import java.rmi.*;
    public interface ReceiveMessageInterface extends Remote
    void receiveMessage(String x) throws RemoteException;
    Server code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.rmi.server.*;
    import java.net.*;
    public class RmiServer extends java.rmi.server.UnicastRemoteObject
    implements ReceiveMessageInterface
    int thisPort;
    String thisAddress;
    Registry registry; // rmi registry for lookup the remote objects.
    // This method is called from the remote client by the RMI.
    // This is the implementation of the �ReceiveMessageInterface�.
    public void receiveMessage(String x) throws RemoteException
    System.out.println(x);
    public RmiServer() throws RemoteException
    try{
    // get the address of this host.
    thisAddress= (InetAddress.getLocalHost()).toString();
    catch(Exception e){
    throw new RemoteException("can't get inet address.");
    thisPort=3232; // this port(registry�s port)
    System.out.println("this address="+thisAddress+",port="+thisPort);
    try{
    // create the registry and bind the name and object.
    registry = LocateRegistry.createRegistry( thisPort );
    registry.rebind("rmiServer", this);
    catch(RemoteException e){
    throw e;
    static public void main(String args[])
    try{
    RmiServer s=new RmiServer();
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    Client code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.net.*;
    public class RmiClient
    static public void main(String args[])
    ReceiveMessageInterface rmiServer;
    Registry registry;
    String serverAddress=args[0];
    String serverPort=args[1];
    String text=args[2];
    System.out.println("sending "+text+" to "+serverAddress+":"+serverPort);
    try{
    // get the �registry�
    registry=LocateRegistry.getRegistry(
    serverAddress,
    (new Integer(serverPort)).intValue()
    // look up the remote object
    rmiServer=
    (ReceiveMessageInterface)(registry.lookup("rmiServer"));
    // call the remote method
    rmiServer.receiveMessage(text);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    }

    When we compile with rmic skeleton and stub get created then we hav to place stub at each client ???Your remote client applcation need only _Stub.class fiels.
    Is there way by which we can know how many clients are connected to the
    server and there IP address, can anyone give the code... I guess that you should use a RMI login/logout method to register/unregister your client connection information into a databse or a simple static Hashtable(Vector) object.

  • Help needed in understanding this question, please.

    Here is the question:
    What is the number displayed when the following program is compiled and run.
    class test {
        public static void main(String args[]) {
            test test1 = new test();
                System.out.println(test1.xyz(100));   
        public int xyz(int num) {
            if(num == 1) return 1;
            else return(xyz(num-1) + num);
    Answer= 5050.
    I'll be honest I am lost as to what happens in this code. Any help in explaining what happens in the code would be gratefully received, thanks, Dave.

    public int xyz(int num) {
    if(num == 1) return 1;
    else return(xyz(num-1) + num);
    it's called recursion, the method calls itself
    xyz(100) returns
    xyz(99)+100 which returns
    xyz(98)+99 which returns
    xyz(97)+98 which returns
    xyz(99)+100 which returns
    until you get to xyz(1) which returns 1
    so starting from the end of the recursion you get
    (for num = 2): 1+2
    (for num = 3): 3+3
    (for num = 4): 6+4
    (for num = 5): 10+5
    (for num = 100): 4950+100

  • Plz tell me the error at this simple program

    at this orogram i want the user to input the number and then he get th factorial...
    my program is:
    import javax.swing.JOptionPane;
    public class Ch4_32a
    public static void main (String[]args)
    int f=1, i=1,N;
    String E;
              String M = JOptionPane.showInputDialog("Enter the number");
              N=Integer.parseInt(M);
              while(i<=N);
                   f=f*i;
                   i++;
              JOptionPane.showMessageDialog(null,"the factorial is"+E);
              f=Integer.parseInt(E);
    ******and when i copile it the result is:
    C:\Documents and Settings\F A M I L Y\Desktop\MyProgs\azza\Ch4_32a.java:22: variable E might not have been initialized
              JOptionPane.showMessageDialog(null,"the factorial is"+E);
    ^
    1 error
    it tell me to init the value of E but ir is a string,,
    so plz help me to get the real error

    i delete the (parseInt{) and compile it completle
    but when i excut it the firs widow appear (Ent the number)
    i Enter the number and then "ok" but the second window don't appear which well tell me the result({f)                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I am not able to understand this java program

    What is the output of bellow code ?
    public class Bean{
        private String str;
        Bean(String str ){
            this.str = str;
        public String getStr() {
            return str;
        public boolean equals(Object o){
            if (!(o instanceof Bean)) {
                return false;
            return ((Bean) o).getStr().equals(str);
        public int hashCode() {
            return 12345;
        public String toString() {
            return str;
    import java.util.HashSet;
    public class Test {
        public static void main(String ... sss) {
            HashSet myMap = new HashSet();
            String s1 = new String("das");
            String s2 = new String("das");
            Bean s3 = new Bean("abcdef");
            Bean s4 = new Bean("abcdef");
            myMap.add(s1);
            myMap.add(s2);
            myMap.add(s3);
            myMap.add(s4);
            System.out.println(myMap);
    }(Choose correct one from multiple bellow)
    1) das abcdef
    2) das abcdef das abcdef
    3) das das abcdef abcdef
    4) das
    What i understand is that the following constructor
    Bean(String str ){
            this.str = str;
        }is used to initialize the instance variable
    private String str;then we have overridden the equals method, in this method we first check if o is not an instance of Bean class whereby we return false
    then we are calling getStr() and equals(str)
    return ((Bean) o).getStr().equals(str);the getStr() method is going to return the instance variable we initialized. SO we will be having something like
    str.equals(str) Here I am not clear what is going to be the output. Please explain in detail

    1. [das, abcdef]
    map create a pair key - value, similar to Dictionary.
    "Hash map structures consist of an internal array where elements are stored. Since the internal storage is an array, clearly there must be a mechanism for determining an index into the array for an arbitrary key. In fact, the mechanism needs to give an integer index value which is smaller than the size of the array. This mechanism is called the hash function. In Java hashed based Maps, the hash function converts any object into an integer that fits into the internal array. You don't have to look hard to find an easily available hash function: every object has a hashCode() method which returns an integer value. To map that value into any array, it is sufficient to convert it to a positive value and take the remainder after dividing by the array size. "
    you will get the same hashcode for the same value!

  • Help needed to understand this problem

    Hello Guys,
    can some one take a look and let me know that the following code segment should do what it seems to be doing?
    StyledDocument doc=(StyledDocument)editor.getDocument();
    MutableAttributeSet attr=new SimpleAttributeSet();
    StyleConstants.setFontFamily(attr,fontFamily);
    switch (fontStyle){
    case 1:
    StyleConstants.setBold(attr,false);
    break;
    case 2:
    StyleConstants.setItalic(attr,false);
    break;
    StyleConstants.setFontSize(attr,fontSize);
    doc.setCharacterAttributes(0,doc.getLength(),attr,true);
    editor.setDocument(doc);
    I am trying to change font properties at the runtime in a JTextPane.which has a file loaded into it.Once I click a button the above changes should apply,,but they don't
    Thanks

    Nevermind..I figured it out...:-)

  • Help needed in understanding the concept of hierarchical queries

    I really need help in this matter. I have a flafile containing about 4000 rows. It is from my supplier, it's structure is as follows:
    create table Flatfile
    (Pgroup varchar2(30),
    Pclass varchar2(30),
    Manufacturer varchar2(30),
    Article varchar2(30),
    Price Number(6,2));
    Insert into Flatfile Values
    ('Application Software','Database Software','Oracle','Oracle 10G',115);
    Insert into Flatfile Values
    ('Application Software','Database Software','Microsoft','MS SQL Server 2000',200);
    Insert into Flatfile Values
    ('Application Software','Spreadsheet Software','Microsoft','Excel',100);
    Insert into Flatfile Values
    ('Monitor','15"','Acer','Acer 15"" TFT superscreen',199);
    Insert into Flatfile Values
    ('Monitor','15"','Sony','Sony R1500 flat',225);
    Insert into Flatfile Values
    ('Monitor','17"','Philips','Philips Flatscreen',250);
    Insert into Flatfile Values
    ('Monitor','19"','Viewsonic','Viewsonic PLasma Monitor',275);
    Insert into Flatfile Values
    ('Processor','AMD','AMD','FX-55',600);
    Insert into Flatfile Values
    ('Processor','Intel','Intel','P4 3 GHZ',399);
    My goal is to make a hierarchical query with the start with and connect by clauses. From what I have read is that I need to normalize the data of the flatfile.
    How do I achieve a table which I can query so that the query will represent the hierarchy that exists. Namely
    Pgroup
    ++Pclasse
    Application Software
    ++Database Software
    ++Spreadsheet Software
    So a 2-level hierarchy. I'd like to understand this simple concept first. I built on the knowledge that I gain. So the questions are:
    1.What do I need to do to make the table so that I can use a hierarchical query on it?
    2. How should the query syntax be?
    3. Is it also possible to get the data in the hierarchical query sorted asec?
    I would only like to use the simple structures of the start with and connect by clauses first. I've read there are some new additions to 10G. The problem with the examples used by the tutorials is that the tables are already made so that they are suitable for hierarchical queries. I hope to understand it by this example. And take it a step further.
    Sincerely,
    Pete

    Primarily hierarchy query serves to process tree-like structures which RDBMS simulates using through parent-child relation, often in a single table (see famoust
    EMP table where employee can have the manager who is an employee at the same time).
    In your case it could look like:
    SQL> select pgroup, pclass from flatfile;
    PGROUP                         PCLASS
    Application Software           Database Software
    Application Software           Database Software
    Application Software           Spreadsheet Software
    Monitor                        15"
    Monitor                        15"
    Monitor                        17"
    Monitor                        19"
    Processor                      AMD
    Processor                      Intel
                                   Application Software
                                   Monitor
                                   Processor
    12 rows selected.
    SQL> select decode(level,1,pclass,'  ' || pclass), Manufacturer from flatfile
      2  start with pgroup is null
      3  connect by prior pclass = pgroup
      4  /
    DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
    Application Software
      Database Software              Oracle
      Database Software              Microsoft
      Spreadsheet Software           Microsoft
    Monitor
      15"                            Acer
      15"                            Sony
      17"                            Philips
      19"                            Viewsonic
    Processor
      AMD                            AMD
      Intel                          Intel
    12 rows selected.The hierarchy syntax is described completely in the documentation including
    LEVEL and PRIOR keywords.
    As for the ordering question you can use siblings ordering:
    SQL> select decode(level,1,pclass,'  ' || pclass), Manufacturer from flatfile
      2  start with pgroup is null
      3  connect by prior pclass = pgroup
      4  order siblings by 1 desc
      5  /
    DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
    Processor
      Intel                          Intel
      AMD                            AMD
    Monitor
      19"                            Viewsonic
      17"                            Philips
      15"                            Acer
      15"                            Sony
    Application Software
      Spreadsheet Software           Microsoft
      Database Software              Oracle
      Database Software              Microsoft
    12 rows selected.Rgds.

  • Who can understand this problem..im confused pls help me!!!

    first i have to say i dont no much about troubleshooting or software side of computers.so pls help me to find me an answer for my problem. i cant get any search results ,when i typed something and cliked search it comes with an error message.but when i click on any news or any thing on yahoo page ,it comes up with out any errors(my home page is yahoo )and also i can acssess to my email also.this problem began 4 , 5 months back.funny thing some times i can search any thing without errors.but in next time it goes totaly wrong with error masseges. i cant understand this problem.it makes me sick.pls anyone can help me?another thing im using IE and FIRE FOX .today i found another thing.when i type something on ask search bar it came up with search results but when i typed same thing on google search bar it came up with error message..i'm really confused with this problem.pls pls help me :(

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    * [[Searches are redirected to another site]]

  • Please help me with simple program

    Can someone please write a simple program for me that opens up a webpage in the center of the screen , with a set size, and then asks the user where they would like to click on the screen. Then once the person clicks it asks how many times they would like to click there, and then once they enter the # the program opens up the webpage (in the center at the same spot as before, with the same set size) and automatically clicks on the predesignated spot , and then closes all open internet windows, and keeps doing it for however many times the person chose. PLEASE HELP ME WITH THIS!!! If you could, please post the source code here. Thank you so much to whoever helps me!!!!!!!

    If it's not to learn, then what is the purpose of
    this project?well, if it's not HW and its not for learning java, then why the hell would anyone like to have a program that may open a webpage and then repeatedly click on predefined place...
    let me see...
    now if he had asked for program that fakes IP as well, then i would suggest that he tryes to generate unique clicks, but now... i'm not sure... maybe just voting in some polls or smthing... though, i would not create a program that clicks on the link or form element, but rather just reload url with given parameters for N times...

Maybe you are looking for

  • How can i convert  my invoice which is in smart forms to xml file

    how can i convert  my invoice which is in smart forms to xml file.

  • Firefox is now not extending to full screen upon start-up

    Firefox used to open msn homepage completely to the edges of our computer screen, excepting browser .. now.. inexplicably, it leaves a border of desktop background showing. We wish it to return to previous format. (?) == This happened == Every time F

  • ApplicationLifecycleListener vs. load order

    Why isn't the load order reversed when shutting down a server? We have a number of applications (EARs) which have implemented the ApplicationLifecycleListener. When the server boots, the different applications listeners start()-methods get called in

  • CS3 File open by two users simultaneously

    I work in an office network environment, at a news paper, and we use InDesign CS3 to lay out our paper. We're having a problem where two users are able to open and work on the same file at the same time, and save it. It's led to work being lost. If o

  • Clear net connectivity with time capsule/home network

    So Chicago has a new ISP - Clear. It is a wireless provider that boasts download speeds up to 12mbps. I have been using ATT DSL elite pro with time capsule as my wireless hub. I have extended my network via airport express and have two that power spe