SQL Loader : Trim and Decode functions help please

Hi,
I have to load data from a flat file, for some columns i need to use TRIM and DECODE functions.It is a pipe delimited file.
I get syntax errors (one is below) same error listed for TRIM.
SQL*Loader-350: Syntax error at line xx.
Expecting "," or ")", found "DECODE".
===========
,FINAL_BILL_DATE CHAR(30) "TRIM(:FINAL_BILL_DATE)"
,BUSINESS_ID "DECODE(:BUSINESS_ID,'B',1,'C',2,'E',3,'G',4,'O',5,'R',6,'T',7,'U',8,'H',9,-1)"
Can anyone please help.
Thanks
Cherrish

Hello Cherrish.
The error you are receiving leads me to believe that at some point prior to the DECODE on the line for BUSINESS_ID, probably some line even before the FINAL_BILL_DATE line, there a syntactical error causing the quotes before the DECODE to actually terminate some other syntax. Without all of the lines that could actually contribute to this, including the header details, this is the best I can advise.
Hope this helps,
Luke
Please mark the answer as helpful or answered if it is so. If not, provide additional details.
Always try to provide create table and insert table statements to help the forum members help you better.

Similar Messages

  • Encore CS4 loads 10% and STOPS! help please

    I'm a high school student working on a dvd for my school's battle of the bands (it's over 2 hours long counting the concert itself and interviews with the bands), i'm quite adept with Adobe software and have been using it for some time. The project file is massive and i've been able to get all of my footage into Adobe Encore CS4 and make the menu. Now when I try to open the project, it loads 10% and stops, freezes, and will not respond. The computers here are Dell's running Windows XP and i have a feeling they're from about 2005-2007. Could this be due to the computer I'm working on? Or possibly a problem with Encore? I also have a feeling that I might need administrative authority on the computer to be able to work on a file in Encore that's as massive as this.
    Please help me in any way you can, I've been working on this project for months and would like to finally finish it.

    Welcome to the forum.
    Both PrPro and Encore really, really want to be run under an Administrator account. That would be my first guess, but something puzzles me - you had been working in Encore with this Project in the past. Did your IT department change your account?
    As a test, can you launch Encore and choose New Project? If so, set that up with a few Imported test Assets. Add a Menu from the Library and Link the Assets - Preview. Does everything work OK?
    Next, where are your Assets stored, the ones for your Battle of the Bands Project? Are they on a networked drive, a USB external, etc.? Those can be an issue.
    Last, tell us a bit about your Assets (especially your AV files), and also how you Imported them, i.e. as Timelines, or as Assets, to be dragged to Timelines. Are your AV files muxed, i.e. containing both the Audio and the Video, or are they elemental/elementary streams (Video-only in one file and Audio-only in another)?
    I'm hoping that there is nothing wrong with the Project itself, as Encore does not have the capacities for "saving" a corrupt Project, that PrPro does.
    Good luck,
    Hunt

  • Case statement and Decode function both are not working in Select cursor.

    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. On the other hand both the things work in just select statement.
    See the first column in select (PAR_FLAG), I need to have this evaluated along with other fields. Can you please suggest some thing to make this work. And also I would like to
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Author : Amit Juneja
    Date : 06/20/2011
    Description:
    Updates the Diamond MEMBER_MASTER table with the values from
    INC.MEM_NJ_HN_MEMBER_XREF table.
    declare
    rec_cnt number(12) := 0;
    commit_cnt number(4) := 0;
    cursor select_cur is
    Select DECODE(1,
    (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY'))),
    'Y',
    'N') PAR_FLAG,
    H.SEQ_ELIG_HIST,
    H.SEQ_MEMB_ID,
    H.SEQ_SUBS_ID,
    H.SUBSCRIBER_ID,
    H.PERSON_NUMBER,
    H.EFFECTIVE_DATE,
    H.TERM_DATE,
    H.TERM_REASON,
    H.RELATIONSHIP_CODE,
    H.SEQ_GROUP_ID,
    H.PLAN_CODE,
    H.LINE_OF_BUSINESS,
    H.RIDER_CODE_1,
    H.RIDER_CODE_2,
    H.RIDER_CODE_3,
    H.RIDER_CODE_4,
    H.RIDER_CODE_5,
    H.RIDER_CODE_6,
    H.RIDER_CODE_7,
    H.RIDER_CODE_8,
    H.MEDICARE_STATUS_FLG,
    H.OTHER_STATUS_FLAG,
    H.HIRE_DATE,
    H.ELIG_STATUS,
    H.PREM_OVERRIDE_STEP,
    H.PREM_OVERRIDE_AMT,
    H.PREM_OVERRIDE_CODE,
    H.SEQ_PROV_ID,
    H.IPA_ID,
    H.PANEL_ID,
    H.SEQ_PROV_2_ID,
    H.SECURITY_CODE,
    H.INSERT_DATETIME,
    H.INSERT_USER,
    H.INSERT_PROCESS,
    H.UPDATE_DATETIME,
    H.UPDATE_USER,
    H.UPDATE_PROCESS,
    H.USER_DEFINED_1,
    H.SALARY,
    H.PEC_END_DATE,
    H.REASON_CODE,
    H.PEC_WAIVED,
    H.BILL_EFFECTIVE_FROM_DATE,
    H.BILLED_THRU_DATE,
    H.PAID_THRU_DATE,
    H.SUBSC_DEPT,
    H.SUBSC_LOCATION,
    H.USE_EFT_FLG,
    H.BENEFIT_START_DATE,
    H.SEQ_ENROLLMENT_RULE,
    H.MCARE_RISK_ACCRETION_DATE,
    H.MCARE_RISK_DELETION_DATE,
    H.MCARE_RISK_REFUSED_DATE,
    H.COMMENTS,
    H.USER_DEFINED_2,
    H.USER_DEFINED_3,
    H.RATE_TYPE,
    H.PCPAA_OCCURRED,
    H.PRIVACY_ON,
    H.PCP_CHANGE_REASON,
    H.SITE_CODE,
    H.SEQ_SITE_ADDRESS_ID,
    PM.seq_prov_id rendered_prov
    from hsd_member_elig_history H,
    INC.PCP_REASSIGN_RPRT_DATA P,
    hsd_prov_master PM
    where P.subscriber_id = H.subscriber_id
    and P.rendered_pcp = PM.provider_ID
    and H.elig_status = 'Y'
    and (H.term_date is NULL or H.term_date >= last_day(sysdate))
    order by H.Seq_memb_id;
    begin
    for C in select_cur loop
    rec_cnt := rec_cnt + 1;
    update hsd_member_elig_history
    set term_date = TRUNC(SYSDATE - 1),
    term_reason = 'PCPTR',
    update_datetime = SYSDATE,
    update_user = USER,
    update_process = 'TD33615'
    where seq_elig_hist = C.seq_elig_hist
    and seq_memb_id = C.seq_memb_id;
    INSERT INTO HSD_MEMBER_ELIG_HISTORY
    (SEQ_ELIG_HIST,
    SEQ_MEMB_ID,
    SEQ_SUBS_ID,
    SUBSCRIBER_ID,
    PERSON_NUMBER,
    EFFECTIVE_DATE,
    TERM_DATE,
    TERM_REASON,
    RELATIONSHIP_CODE,
    SEQ_GROUP_ID,
    PLAN_CODE,
    LINE_OF_BUSINESS,
    RIDER_CODE_1,
    RIDER_CODE_2,
    RIDER_CODE_3,
    RIDER_CODE_4,
    RIDER_CODE_5,
    RIDER_CODE_6,
    RIDER_CODE_7,
    RIDER_CODE_8,
    MEDICARE_STATUS_FLG,
    OTHER_STATUS_FLAG,
    HIRE_DATE,
    ELIG_STATUS,
    PREM_OVERRIDE_STEP,
    PREM_OVERRIDE_AMT,
    PREM_OVERRIDE_CODE,
    SEQ_PROV_ID,
    IPA_ID,
    PANEL_ID,
    SEQ_PROV_2_ID,
    SECURITY_CODE,
    INSERT_DATETIME,
    INSERT_USER,
    INSERT_PROCESS,
    UPDATE_DATETIME,
    UPDATE_USER,
    UPDATE_PROCESS,
    USER_DEFINED_1,
    SALARY,
    PEC_END_DATE,
    REASON_CODE,
    PEC_WAIVED,
    BILL_EFFECTIVE_FROM_DATE,
    BILLED_THRU_DATE,
    PAID_THRU_DATE,
    SUBSC_DEPT,
    SUBSC_LOCATION,
    USE_EFT_FLG,
    BENEFIT_START_DATE,
    SEQ_ENROLLMENT_RULE,
    MCARE_RISK_ACCRETION_DATE,
    MCARE_RISK_DELETION_DATE,
    MCARE_RISK_REFUSED_DATE,
    COMMENTS,
    USER_DEFINED_2,
    USER_DEFINED_3,
    RATE_TYPE,
    PCPAA_OCCURRED,
    PRIVACY_ON,
    PCP_CHANGE_REASON,
    SITE_CODE,
    SEQ_SITE_ADDRESS_ID)
    values
    (hsd_seq_elig_hist.nextval,
    C.SEQ_MEMB_ID,
    C.SEQ_SUBS_ID,
    C.SUBSCRIBER_ID,
    C.PERSON_NUMBER,
    trunc(SYSDATE),
    C.TERM_DATE,
    C.TERM_REASON,
    C.RELATIONSHIP_CODE,
    C.SEQ_GROUP_ID,
    C.PLAN_CODE,
    C.LINE_OF_BUSINESS,
    C.RIDER_CODE_1,
    C.RIDER_CODE_2,
    C.RIDER_CODE_3,
    C.RIDER_CODE_4,
    C.RIDER_CODE_5,
    C.RIDER_CODE_6,
    C.RIDER_CODE_7,
    C.RIDER_CODE_8,
    C.MEDICARE_STATUS_FLG,
    C.OTHER_STATUS_FLAG,
    C.HIRE_DATE,
    C.ELIG_STATUS,
    C.PREM_OVERRIDE_STEP,
    C.PREM_OVERRIDE_AMT,
    C.PREM_OVERRIDE_CODE,
    C.SEQ_PROV_ID,
    C.IPA_ID,
    C.PANEL_ID,
    C.SEQ_PROV_2_ID,
    C.SECURITY_CODE,
    SYSDATE,
    USER,
    'TD33615',
    SYSDATE,
    USER,
    'TD33615',
    C.USER_DEFINED_1,
    C.SALARY,
    C.PEC_END_DATE,
    C.REASON_CODE,
    C.PEC_WAIVED,
    C.BILL_EFFECTIVE_FROM_DATE,
    C.BILLED_THRU_DATE,
    C.PAID_THRU_DATE,
    C.SUBSC_DEPT,
    C.SUBSC_LOCATION,
    C.USE_EFT_FLG,
    C.BENEFIT_START_DATE,
    C.SEQ_ENROLLMENT_RULE,
    C.MCARE_RISK_ACCRETION_DATE,
    C.MCARE_RISK_DELETION_DATE,
    C.MCARE_RISK_REFUSED_DATE,
    C.COMMENTS,
    C.USER_DEFINED_2,
    C.USER_DEFINED_3,
    C.RATE_TYPE,
    C.PCPAA_OCCURRED,
    C.PRIVACY_ON,
    C.PCP_CHANGE_REASON,
    C.SITE_CODE,
    C.SEQ_SITE_ADDRESS_ID);
    commit_cnt := commit_cnt + 1;
    if (commit_cnt = 1000) then
    dbms_output.put_line('Committed updates for 1000 records.');
    commit;
    commit_cnt := 0;
    end if;
    end loop;
    commit;
    dbms_output.put_line('Total number of MEMBER_ELIG_HISTROY records inserted : ' ||
    rec_cnt);
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    end;

    user10305724 wrote:
    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. Please define what you mean by not working even if your computer screen is near the internet we can't see it.
    You should also look at the FAQ about how to ask a question
    SQL and PL/SQL FAQ
    Particularly *9) Formatting with {noformat}{noformat} Tags* and posting your version.
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Does this mean you are using 8i? Then scalar sub queries - selects within the select list, are not supported, along with CASE in PL/SQL.
    Select DECODE(1,
    * (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY')))*,
    'Y',
    'N') PAR_FLAG,
    >
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • All of my playlists made on my Ipod touch 3rd gen keep disappearing when I sync it to itunes. Drivng me crazy. All software up to date on both itunes and Ipod. Help please.

    All of my playlists made on my Ipod touch 3rd gen keep disappearing when I sync it to itunes. Drivng me crazy. All software up to date on both itunes and Ipod. Help please.
    I tend to make my playlists right on my ipod. This did not happen for the last 2 years. Just started recently. Did get a new computer recently.

    That is because you got a new computer. You can only sync all media from one syncing computer. You can sync from any computer to iPod using the manual method but that does not sync from iPod to computer.
    To make this your syncing computer:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • £37 has disappeared from my iTunes account. But no apps or music or tv/movies have been bought. Has it been hacked and can you help please?

    £37 has disappeared from my iTunes account. But no apps or music or tv/movies have been bought. Has it been hacked and can you help please?

    Report it to Apple:
    How to report an issue with your iTunes Store purchase - http://support.apple.com/kb/HT1933 - working through iTunes application and iTunes Store interface.
    iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html
    Change the password on your account.

  • HT1923 Hi, I have a iPod touch 4th generation and I does not show in iTunes. It comes up as charging when it is plugged into the computer but just not in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Hi, I have a iPod touch 4th generation. It comes up as charging when it is plugged into the computer but it does not show in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Try here  >   - http://support.apple.com/kb/TS1369.

  • My volume control is disabled after plugging in and unplugging headphones, Help Please...

    Dear all, this is my issue, I have since the beginning (October 2014) with my iPhone 5S, 64GB: My volume control is disabled after plugging in and unplugging headphones, Help Please...

    This should not happen if you have the output volume in System Prefs/Sound set low. Have you tried setting the ITunes player volume at top left a bit lower?

  • SQL*Loader and DECODE function

    Hi All,
    I am loading data from data files into oracle tables and while loading the data using SQL*Loader, the following requirement needs to be fulfilled.
    1) If OQPR < 300, RB = $ 0-299, SC = "SC1"
    2) If 300 < OQPR < 1200, RB = $ 300-1199, SC = "SC2"
    3) If 1200 < OQPR < 3000, RB = $ 1200-2999, SC = "SC3"
    4) If OQPR > 3000 USD, RB = > $3000, SC = "SC4"
    Here OPQR is a field in the data file.
    Can anyone suggest how do we handle this using DECODE function? Triggers and PL/SQL functions are not to be used.
    TIA.
    Regards,
    Ravi.

    The following expression gives you different values for your different intervals and boundaries :
    SIGN(:OQPR - 300) + SIGN(:OQPR - 1200) + SIGN(:OQPR - 3000)

  • MONTH and YEAR functions.  Please help...

    Can anyone tell me why the YEAR and MONTH functions will only accept the format dd-MMM-yyyy (ex. 01-JAN-2009)
    The calendar prompt will only retun the format dd/mm/yyy (ex. 01/01/2009). This renders the calender pretty useless.
    I am really in need of some help on this. Does anyone know how to get the value returned from the calendar in a prompt into a format that can be used by the YEAR and MONTH functions?
    Thank you in advance

    Hi,
    Can you do those things at DB Level.. addition of YEAR and MONTH columns to Table.. because doing CAST to DATE operation will work at DB Level..
    Ex: In Answers if you give YEAR(CAST('01-03-2009' AS DATE)), it is erroring out because default allowed date format of BI is different from the one specified.. Though it is issuing correct SQL which is working at DB level.. donno how to change the default format of BI..
    So, what I can suggest is an alternative, which is at DB level.. if it is apt for you.. then
    Following statement gives you YEAR value..
    TO_NUMBER(TO_CHAR( cast('01-03-2009' as DATE), 'yyyy'), '9999')
    This is the statement taken from Manage Session of BI..
    -Vency

  • Hi, I recently got a newer desktop to replace my old laptop and I uploaded my pics with my picture keeper and I can find them in images BUT I can't find iPhoto. On all my other device sit always loads to iPhoto automatically! Help please!

    HHi, I recently got a newer desktop to replace my older laptop and I upl my pics from my picture keeper and I see them in images but I can't find iPhoto! Help please.

    With the amount of information you've provided it's impossible to offer a solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?  A new iMac will have Yosemite. Confirm.
    what system version are you running? Download iPhoto 6 from the App store.  Did you?
    what do you mean by "picture keeper"?
    have you looked in the Applications folder for an iPhoto application?
    is your iPhoto Library in your Pictures folder ?

  • SQL Loader ISSUE- when invoking function in a package - in Direct Path- SPK

    This is the loader file a.ctl
    load data
    append
    into table emp
    when eno='4'
    (eno number,
    ename varchar2(20))
    when (1)<>'4'
    into table detpt
    (deptno number,
    deplogid "Log.get_logid('logid')"
    Note: the deptlogid field is not null column.
    The par fie is as follows
    rows=1000
    errors=0
    direct=true
    control=a.ctl
    when i am running this file i am getting error when i am invoking the package Log.get_logid('logid')" in direct mode. It returns null value when it is used in control file.
    1) if i am running this function in sql prompt like
    select Log.get_logid('logid') from dual
    i am getting result as 121.
    2) what is the problem when the same function is used in Sql loader in direct mode.
    3) is there any restriction to use the function in sql loader?
    4) whether to use the function in sql loader is applicable for direct mode or conventional mode.
    5) when i am running in conventional mode it is working fine . what is the reason??
    I am running the loader from dos prompt like
    c:> sqlldr scott/tiger@dev parfile=abc.par
    Oracle 9i is the version for the loader.
    Please help me out to solve the issue

    This is the loader file a.ctl
    load data
    append
    into table emp
    when eno='4'
    (eno number,
    ename varchar2(20))
    when (1)<>'4'
    into table detpt
    (deptno number,
    deplogid "Log.get_logid('logid')"
    Note: the deptlogid field is not null column.
    The par fie is as follows
    rows=1000
    errors=0
    direct=true
    control=a.ctl
    when i am running this file i am getting error when i am invoking the package Log.get_logid('logid')" in direct mode. It returns null value when it is used in control file.
    1) if i am running this function in sql prompt like
    select Log.get_logid('logid') from dual
    i am getting result as 121.
    2) what is the problem when the same function is used in Sql loader in direct mode.
    3) is there any restriction to use the function in sql loader?
    4) whether to use the function in sql loader is applicable for direct mode or conventional mode.
    5) when i am running in conventional mode it is working fine . what is the reason??
    I am running the loader from dos prompt like
    c:> sqlldr scott/tiger@dev parfile=abc.par
    Oracle 9i is the version for the loader.
    Please help me out to solve the issue

  • Help with loading dynamic classes ..need help please

    i'm trying to design a program where by i can load dynamic classes
    the problem i'm getting is that only one class is loading.
    classes are loaded by their names,and index numbers of public methods from a linklist
    .When the program runs only the first class is ever loaded and only the methods of that class ..
    help please
    //class loader
    import java.lang.reflect.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class Test2 extends Thread
         public Class c;
         public Class Ray;
         public Class[] x;
         public static Object object = null;
         public Method[] theMethods;
         public static Method[] method,usemethod;
         public int methodcount;
         public static int MethodCt;     
         public static JList list;
    public Method[] startClass(String SetMethodName)
         try
              c = Class.forName(SetMethodName);
              object = c.newInstance();
              theMethods = c.getDeclaredMethods();
              // number of methods
              //methodcount = theMethods.length;
         catch (Exception e)
              e.printStackTrace();
    // return the array then invoke the particular method later
    return theMethods ;
    public void RunMethod(Method[] SomeMethod, int methodcount)
         try
              SomeMethod[methodcount].invoke( object,null );
         catch (Exception e)
              e.printStackTrace();
    // end class loader
    //main calling program
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing .*;
    import java.lang.reflect.*;
    public class JFMenu extends JFrame
         public static JMenu pluginMenu;
         public static JMenuBar bar;
         public static final Test2 w = new Test2();
    public static Method[] setmethod;
    private static ClassLinkList startRef = null;
    private static ClassLinkList linkRef3 = null;
    private static ClassLinkList startRef2 = null;
    private String ClassName,ShortCut;
    private int MethodNumber;
    private JMenuItem PluginItem;
         JFMenu()
              super (" JFluro ");     
              JMenu fileMenu = new JMenu("File");
              fileMenu.setMnemonic('F');
              JMenuItem exitItem = new JMenuItem("Exit");
              exitItem.setMnemonic('X');
              fileMenu.add(exitItem);
              exitItem.addActionListener
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             System.exit(0);
              JMenu pluginMenu = new JMenu("Plugins");
              pluginMenu.setMnemonic('P');
              startRef = new ClassLinkList ("Hello","Hello ",2,1926,"Painter");
              addToList("Foo","Foo ",0,1930,"Author");
              while (startRef.linkRef5 != null)
                   //pluginMenu.addSeparator();
                   ClassName = startRef.linkRef5.className;
                   ShortCut = startRef.linkRef5.shortcutName;
    MethodNumber = startRef.linkRef5.methodNumber;
    AddMenuItem(pluginMenu,ShortCut,ClassName,MethodNumber);
                   startRef.linkRef5 = startRef.linkRef5.next;
              // create menu bar and add JFMenu window to it
              JMenuBar bar = new JMenuBar();
              setJMenuBar(bar);
              bar.add(fileMenu);
              bar.add(pluginMenu);
              //attributes for JFMenu frame
              setSize(500,200);
              setVisible(true);
         }// end JFMenu constructor
         public void AddMenuItem(JMenu MainMenu, String shortcut,String className, final int methodCount )
              if (MainMenu==null)
                   return;
              //JMenuItem item;
              JMenuItem item = new JMenuItem(shortcut);
              MainMenu.add(item);
              setmethod = w.startClass(className);
              item.addActionListener
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             w.RunMethod(setmethod,methodCount);
              //item.addActionListener(ij);
         public JMenuItem AddMenuItem2(JMenu MainMenu, String shortcut)
              //if (MainMenu==null)
              //     return Main;
              //JMenuItem item;
              JMenuItem item = new JMenuItem(shortcut);
              MainMenu.add(item);
              //setmethod = w.startClass(className);
              //item.addActionListener(this);
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             w.RunMethod(setmethod,methodCount);
              //item.addActionListener(ij);
         return item;
         public void ReloadMenu(JMenuBar Bar, JMenu PluginMenu)
              if (Bar==null)
                   return;
              //     setJMenuBar(Bar);
              Bar.add(PluginMenu);
              //item.addActionListener(ij);
    public static void main (String args[])
              JFMenu menapp = new JFMenu();
    public static void addToList(String clname, String shcutname, int metnumber, int year2,
                                  String description) {
         // Create instance of class ClassLinkList
    ClassLinkList newRef = new ClassLinkList(clname,shcutname,metnumber,year2,
                                       description);
    // Add to linked list;
         startRef = startRef.addRecordToLinkedList(newRef);
    // end main calling program
    class Hello extends Thread
    public int getNum()
    System.out.println("I can be ");
    return 5;
    public void rayshowName()
    System.out.println("anything i want ");
    public void rayshowName3()
    System.out.println("to be ");
    class Foo extends Thread
    public int getNum()
    System.out.println("IMHOFF");
    return 5;
    public void rayshowName()
    System.out.println("raYMOND");
    // FAMOUS PERSONS LINKED LIST EXAMPLE
    // Frans Coenen
    // Saturday 15 January 2000
    // Depaertment of Computer Science, University of Liverpool
    class ClassLinkList {
    /* FIELDS */
    public String className;
    public String shortcutName;
    public int methodNumber;
    public int yearOfDeath;
    public String occupation;
    public ClassLinkList next = null;
    public ClassLinkList linkRef5 = this;
    public ClassLinkList startRef = null;
    /* CONSTRUCTORS */
    /* FamousPerson constructor */
    public ClassLinkList(String classname, String shortcutname, int methodnumber, int year2,
                                  String description) {
         className = classname;
         shortcutName = shortcutname;
         methodNumber = methodnumber;
         yearOfDeath = year2;
         occupation = description;
         next = null;
    /* METHODS */
    /* Output famous person linked list */
    public void outputClassLinkedList()
         //public ClassLinkList outputClassLinkedList() {
         ClassLinkList linkRef = this;
         // Loop through linked list till end outputting each record in turn
    while (linkRef != null)
         //System.out.println(linkRef5);
         System.out.println(linkRef.className + ", " + linkRef.shortcutName +
                   " (" + linkRef.methodNumber + "-" + linkRef.methodNumber +
                   "): " + linkRef.occupation);
         linkRef = linkRef.next;     
    //return linkRef;
    //public String ShowCasname()
    //return String ;     
    /* Add a new record to the linked list */
    public ClassLinkList addRecordToLinkedList(ClassLinkList newRef) {
         ClassLinkList tempRef, linkRef;
         // Test if new person is to be added to start of list if so return
    if (newRef.testRecord(this) ) {
         newRef.next = this;
         return(newRef);
         // Loop through remainder of linked list
         tempRef = this;
         linkRef = this.next;
         while (linkRef != null) {
         if (newRef.testRecord(linkRef)) {
         tempRef.next = newRef;
              newRef.next = linkRef;
              return(this);
         tempRef = linkRef;
         linkRef = linkRef.next;
    // Add to end
    tempRef.next = newRef;
         return(this);
    /* Delete a record from the linked list given the first and last name. Four
    posibilities:
    1) Record to be deleted is at front of list
    2) Record to be deleted is at end of list
    3) Record to be deleted is in middle of list
    4) Record not found. */
    public ClassLinkList deleteRecord(String lName, String fName) {
    ClassLinkList tempRef, linkRef;
    // Record at start of list
    if ((this.className == lName) & (this.shortcutName == fName))
         return(this.next);
         // Loop through linked list to discover if record is in middle of list.
         tempRef = this;
    linkRef = this.next;
    while (linkRef != null) {
         if ((linkRef.className == lName) & (linkRef.shortcutName == fName)) {
    tempRef.next = linkRef.next;
    return(this);
    tempRef = linkRef;
    linkRef = linkRef.next;
    // Record at end of list, or not found
    if ((linkRef.className == lName) & (linkRef.shortcutName == fName))
                        linkRef = null;
         else System.out.println("Record: " + lName + " " + fName + " not found!");
         return(this);
    /* TEST METHODS */
    /* Test whether new record comes before existing record or not. If so return
    true, false otherwise. */
    private boolean testRecord(ClassLinkList existingRef) {
         int testResult = className.compareTo(existingRef.className);
         if (testResult < 0) return(true);
         else {
         if ((testResult == 0) & (shortcutName.compareTo(existingRef.shortcutName) < 0 ))
                             return(true);
         // Return false
         return(false);
         public void addToList(String clname, String shcutname, int metnumber, int year2,
                                  String description)
         // Create instance of class Famous Person
    ClassLinkList newRef = new ClassLinkList(clname,shcutname,metnumber,year2,
                                       description);
    // Add to linked list;
         startRef = startRef.addRecordToLinkedList(newRef);

    I have a similar problem. I am writing a program to read the class names from database and instantiate several classes which extends from ServiceThread (an abstract class extending from Thread).
    rs = pStmt.executeQuery();
    while(rs.next()) {
    String threadclassname = rs.getString("classname").trim();
    try{
    ServiceThread threadinstance = (ServiceThread)Class.forName(threadclassname).newInstance();
    }catch ...
    So far, only the first class is ever instantiated and runs fine. But subsequent classes do not even get pass the "... ... Class.forName(...).newInstance();" line.
    Funny thing is that there are also no exceptions. The JVM just seem to hang there.

  • Decode Function Help

    Hi,
    I am new to Oracle Development.
    MY Requirement:
    I need to populate a column 'ISMSG' with YES / NO based on the following condition
    When code = 'S' or 'O'......the column 'ISMSG' should display YES else NO..
    ie output should be like
    CODE ISMSG
    A NO
    S YES
    S YES
    O YES
    My code for Decode function:
    CASE
    WHEN c.code = 'S' THEN decode( c.code, 'S','YES','NO')
    WHEN c.code = 'O' THEN decode( c.code, 'O','YES','NO')
    END ISMSG,
    Is my code correct? If so is this the best way to do it?
    If not please correct the code.
    Is there an efficient way to do it?
    Thanks in advance.

    Hi,
    You can use either CASE or DECODE for that; there's no need to use both.
    Using CASE:
    SELECT  c.code
    ,     CASE
             WHEN  c.code  IN  ('S', '0')  THEN  'YES'
                                               ELSE  'NO'
         END     AS ismsg
    FROM    table_x   c;Using DECODE:
    SELECT  c.code
    ,     DECODE ( c.code 
                , 'S'      , 'YES'
                , '0'      , 'YES'
                              'NO'
                )          AS ismsg
    FROM    table_x   c;I suggest you forget about DECODE, and always use CASE, at least while you're just starting out.
    CASE can do anything that DECODE can do. There are a few, simple situations where DECODE is a little shorter than CASE, and therefore a little clearer, but only a little, and, as I said, these are only simple situations, and CASE is clear enough in them.
    DECODE is never much shorter or clearer than CASE. The converse is not true: there are many situations where CASE is much, much shorter and clearer than DECODE.

  • SQL Loader Truncate and SQL TRUNCATE difference

    Could any one let me know what is difference between truncate used by control file of the SQL Loader and TRUNCATE command used by SQL? Is there any impact or difference of these both over the data files.
    Thanks

    Mr Jens I think TRUNCATE in SQLLDR control file reuses extents, unlike SQL TRUNCATE command. In my opinion it is best to truncate these to show the normal usage of these tables, not the elevated values.
    Could you please further comment?

  • Group by and decode function

    Can I use a group by on a decode?
    I am using the sql below and get an error message when I
    try to use the group by on a decode.
    select decode(assignment.catcodeid,
    'D', 'SERVICE REQUESTS AND MAINTENANCE',
    'U', 'SERVICE REQUESTS AND MAINTENANCE',
    'P', 'SERVICE REQUESTS AND MAINTENANCE',
    'E', 'SERVICE REQUESTS AND MAINTENANCE',
    'R', 'SERVICE REQUESTS AND MAINTENANCE',
    'T', 'EDUCATION',
    'O', 'OVERHEAD',
    'L', 'UNPAID LEAVE',
    'V', 'VACATION',
    'S', 'SICK PAY',
    'H', 'HOLIDAY',
    'C', 'COMP TIME',
    'UNKNOWN ACTIVITY') "ACTIVITY",
    assignment.catcodeid, assignment.esthrs,
    SUM(ASSIGNMENT.ESTHRS)
    FROM ASSIGNMENT
    GROUP BY ACTIVITY, catcodeid, esthrs
    The error is
    ORA-00904: "ACTIVITY": invalid identifier
    It is understood that Activity is not a field
    on the table.
    But, is there a way that I can group by the result of
    a decode function or what other method/advice I can use to
    group by the result of this.
    Thanks is advance.

    Hello
    You just need to put the decode statement in the group by as well, you can't just use the alias...And if you just group by the catcodeid, you won't be putting all of the SERVICE REQUESTS AND MAINTENANCE rows together. But, because you are selecting the catcodeid aswell as decoding it, that will happen anyway.
    HTH

Maybe you are looking for

  • Using md5 in a manul tabular form to compare if column value changed

    Version: Application Express 3.2.0.00.27 Hello, I am creating a manul tabular form using apx_item in my select statment that is the source for the query in a report region. I am using a collection. The collection creation statement is:     apex_colle

  • Adobe Acrobat X Standard is displaying some PDFs with garbled text. Help, please.

    I've been using Adobe Acrobat X Standard without any issues for a long while.  The other day, I received a PDF, opened it, and the words are garbled.  My co-worker who has the very same software is able to view the document without all the garbage. 

  • Powerbook 12" G4 works with Tiger?

    I have a 12" Powerbook 1GHz PowerPC G4, with 1,25GB of DDR SDRAM, and a hardisk of 120GB. It also has a CD reader (not a combo CD/DVD. I believe the Tiger needs a DVD reader, am I correct?) I'm noticing that new features and internet programs (lake t

  • Not supported by server versionORAOLAP9.2.0.1.0

    bi_checkconfig -h mayx-move -po 1521 -sid majin -u BIB DEMO -p BIBDEMO I am geting message: BI Beans Diagnostics(v1.0.0.0) 03-5-19 =============================================================================== JDEV_ORACLE_HOME ......................

  • MenuBar Component - Aligning Menu Left

    Hello all, I have a quick question. Is it possible to set the menubar component so that it's submenu is configured to display to the left ( if it was on the far left of the screen)? Currently I have it placed on the left side of the screen, with text