Local final variables

Hi!
I suppose this topic pops up from time to time in forums (I've found some threads after google-ing some), but I couldn't find any authentic answers to this.
According to the standard coding guidelines, how on Earth should you write local final variables?
The java coding guidelines don't explicitly mention this case, only class-level final (static final) variables and some "ANSI" constants. (I don't have any idea what "ANSI constant" is supposed to mean, anyway).
Thanks!

public int getSomeValue(final String parameter) {
final int length = parameter.getLength();
// do something
}Would you call "length" a constant here? Obviously
not, so why do we declare it final? Because it
doesn't change during the execution of this method
and to avoid accidentally assigning a different value
to it.I'm not sure I wouldn't. For several years I've been pretty satisfied with C++'s notion of "const" (in fact, I really miss real "const" functionality in Java, but that's another story).
You could write the equivalent in C++:
int getSomeValue(const std::string parameter) {
const int length = parameter.length();
  // or .size()? I don't remember, but doesn't matter... :)
}You could even write things like this:
for(int i=0;i<5;++i) {
const int j = 2*i;
std::cout << j << endl;
}So, C++ says: if a variable is "const", its value won't change after it's created. The way I see it, the const variable is "recreated" every time you step into the block where it's defined from the outside. (I don't know whether it looks like the same from the implementation point of view, but that doesn't matter.)
And whatever C++ says, it's so, because it is a correct language. :)
Anyway, what you're saying makes sense, and if there's a more explicit way of saying "this is a constant" -as you suggested-, I'm going to use it.
But about the naming convention, I see there's a pretty good unison here, so thanks! :)

Similar Messages

  • How do I pass local final variable value to global variable.

    Hi,
    In my code, I need to pass the local final string varibale value to the global variable for further usage. I know final is constant and inside the braces it can't be modified or assigned to other. Help needed in this regard or how do I re-modify the code according to my requirement i.e assigning the final string variable value to the outside of that block.I need the value of final String variable to be available in the process method outside of the specified block.
    class HostConnection{
    public module process(){
         HostKeyVerification hkv = new HostKeyVerification() {
              public boolean verifyHost(String hostname,SshPublicKey key) {
    final String keyfingerprint = key.getFingerprint();               return true;
    Thanks
    Sri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    SriRaj wrote:
    It seems to be by-default all varibales in the inner calss method are Final.This is not true. Try this:
    class SomeClass {
      public void method() {
        Runnable runnable = new Runnable() {
           public void run() {
              int i = 0;  // new inner-class variable
              i = i + 1;
              System.out.println(i);  //prints "1"
    }But you obviously can't do this:
    class SomeClass {
      public void method() {
        Runnable runnable = new Runnable() {
           public void run() {
              int i = 0;  // new inner-class variable
              i = i + 1;
              System.out.println(i);  //prints "1"
        System.out.println(i); //compiler error: "i" is undefined
    }Because you are declaring i in an inner class. If you want to access the value of i outside that inner class, you'd have to do this:
    class SomeClass {
      private int i;
      public void method() {
        Runnable runnable = new Runnable() {
           public void run() {
              int i = 0;  // new inner-class variable
              i = i + 1;
              System.out.println(i);  //prints "1"
              SomeClass.this.i = i;
        System.out.println(i); //no compiler error
    }If this doesn't answer your question, please try to post an actual question, along with your real code, and any compiler errors you are getting, word for word.

  • Where do you store local final vaiable in? Stack or Heap or else?

    Hi all,
    I know local variables are stored in the stack, but how about local final variables? Are they stored in the stack too? What are their life times? Do they "die" with the method after the method is finished?
    class Example{
    void doStuff() {
    final String z = "local variable";
    Where is z stored? Is it gone when doStruff() is finished?
    Thanks a lot

    davy_wei wrote:
    Thanks DrClap, but it's not the answer to my question.Yes, it was. You asked where final local variables are stored and DrC gave you the correct answer--all local variables, whether final or not, are on the stack. He answered the question you asked.
    >
    See the complete example,
    class Example {
    private String x="Outer";
    void doStuff() {
    String x="local variable";
    class InnerClass {
    public void exampleMethod() {
    System.out.println("x is "+x);
    System.out.println("Local variable x is "+x);
    MyInner mi=new InnerClass();
    mi.doStuff();
    otherMethodInTheExample(mi);    // you can pass the reference of mi to other method
    }You are not able to compile it because the virable x is local. The InnerClass can not access the local variables in the enclosing method, which is doStuff(). Before even after the method completes, the inner class object mi might still be alive on the heap if the method otherMethodInTheExample() store the reference in an instance variable. That's the reason why InnerClass can not access the local variable x.
    However, if we change the local variable x to final, the code can compile and work.The local variable is still stored on the stack. However, since is value is known and known not to change before the inner class gets it, the inner class can get a copy of its value. This would not work if it were non-final.
    Now I have the question. Why the InnerClass can access x when it is set to final. Is x store in the heap too?The inner class gets its own copy of the variable. Since its value is final, it's okay to have multiple copies floating around, since it's impossible for them to get out of sync.

  • Why method local inner class can use final variable rather than....

    Hi all
    Just a quick question.
    Why method-local inner class can access final variable defined in method only?
    I know the reason why it can not access instance variable in method.
    Just can not figure out why??
    any reply would be appreciated.
    Steven

    Local classes can most definitely reference instance variables. The reason they cannot reference non final local variables is because the local class instance can remain in memory after the method returns. When the method returns the local variables go out of scope, so a copy of them is needed. If the variables weren't final then the copy of the variable in the method could change, while the copy in the local class didn't, so they'd be out of synch.

  • Local class n final variable probz

    class Outer{
         Object topClassMethod(){
              final int f = 4 ;
              class Local{
                   public String toString(){
                        return f + "" ;
              return new Local() ;
    class Demo{
         public static void main(String[] args){
              Outer out = new Outer() ; //1
              Object obj = out.topClassMethod() ; //2
              System.out.println(obj) ; //3
    line 3rd is executed after d execution of method called in 2nd line.
    My query is that, where the final variable of topClassMethod is assigned memory(on heap, stack or somethng else),
    because as far upto my knowledge, stack is over after the execution of the method and heap is meant for objects only, yet final variable is still accesible at line 3rd.
    secondly, it's my second query on this site, and i m still confused how to post code here(from some editor, in my case it's JCreator) with proper indentation(just like other does, with a lined background image)??????
    plz help????
    thnx in advance...

    SunFred wrote:
    rits wrote:
    My query is that, where the final variable of topClassMethod is assigned memory(on heap, stack or somethng else),
    because as far upto my knowledge, stack is over after the execution of the method and heap is meant for objects only, yet final variable is still accesible at line 3rd.The local class has an invisible member f that is automatically assigned the value of the local variable f at construction. When you refer to "f" inside of the local class, you aren't accessing the local variable f, but the invisible member f. And that f lives on the heap.Actually the OP's example was so simple that static optimization simplified the problem to nothing! Here is an example of what you mean, though:
    class Outer{
        static Object topClassMethod(final int f){
            class Local{
                public String toString(){
                    return f + "" ;
            return new Local() ;
    class Demo{
        public static void main(String[] args) throws Exception {
            Object obj = Outer.topClassMethod(17) ;
            System.out.println(obj) ;
            Class cls = obj.getClass();
            for(java.lang.reflect.Field f : cls.getDeclaredFields()) {
                System.out.format("name=%s type=%s value=%s%n",
                    f.getName(), f.getType(), f.get(obj));
    }The reflection code produces the output:
    name=val$f type=int value=17

  • Report Painter - Use of Constants / Local Formula Variable

    Hi,
    I am using constant and/or local formula variable in report painter in FSI.
    I could use both the values for calculating percentages, ie. it can be used for multiplication or division. However, when I try to use it for addition or subtraction, I am getting the error message no. KH206.
    In all cases, I am using different values in the formula, i.e. a absolute figure and a GL based figure.
    I am not able to understand, why it even allows me for calculating percentage.
    Can anyone help me in using a absolute figure for input and thereafter use it in addition / subtraction.
    I would prefer an immediate solution to this as I am in the final stages of this report.
    Full points guaranteed.....

    Hi Kash,
    Thanks for your reply..
    Can you elaborate bit further. You mean to say I should create a Constant with some value.
    Thereafter how should I bring that in the form. But, How do I enter the Constant in the Formula... There is no key for entering any text in the formula.. there are only ID (the values which we bring in the form and which can be selected for the formula) and numbers which can be entered.
    So how do I enter the name of the Constant?
    I tried just keying in the name of the Constant, and I could check the formula also, However, while saving the form, I am getting an error,
    Element WCaplimit Bis letztem ATag bis &$BISD is not defined correctly -> check definition
    Message no. KH206
    Diagnosis
    In element WCaplimit Bis letztem ATag bis &$BISD the system adds quantities and values or different currencies.
    Can you please revert back with step by step solution?
    Appreciate your prompt reply.... Thanks

  • Why only final variables can be accessed in an inner class ?

    Variables declared in a method need to declared as final if they are to be accessed in an inner class which resides in that method. My question is...
    1. Why should i declare them as final ? What's the reason?
    2. If i declare them as final, could they be modified in inner class ? since final variables should not modify their value.

    (Got an error posting this, so I hope we don't end up with two...)
    But what if i want to change the final local variable within that method instead of within anonymous class.You can't. You can't change the value of a final variable.
    Should i use same thing like having another local variable as part of method and initializing it with the final local variable?You could do. But as in the first example I posted you are changing the value of the nonfinal variable not the final one. Because final variables can't be changed.
    If so, don't you think it is redundant to have so many local variables for so many final local variables just to change them within that method?If you are worried that a variable might be redundant, don't create it. If you must create it to meet some need then it's not redundant.
    Or is there any alternate way?Any alternate way to do what?

  • Error message: "Attempt to use a non-final variable..."

    I get the following error message
    "....java:771: Attempt to use a non-final variable rightColumn from a different method. From enclosing blocks, only final local variables are available.
              switchToOrderform4( backArrow_J, fwdArrow_J, rightColumn, c, jobticketEnclosure ); // ------- the problem line"
              ^
    The variable is "rightColumn."
    I instantiate it in one class, "Class1."
    Pass it as a parameter to second class, "Class2."
    Pass it as a parameter to a third class, "Class3."
    Pass it as a parameter to a method, "method1( ... )."
    -- Declared & instantiated here, passed as a parameter to
    class Class1 extends JPanel {
         private JLabel rightColumn;
    class Class2 extends MouseAdapter {
    JLabel rightColumn,
    --Passed as a method paramter, causing the compiler error (line 771):
    class Class3 extends JPanel {
    Line 75:      JLabel rightColumn;
    Line 165:                          JLabel rightColumn,
    Line 255:      this.rightColumn = rightColumn;
    Line 771:           method1( backArrow_J, fwdArrow_J, rightColumn, c, jobticketEnclosure ); // ------- the problem line
    Declaring the variables final does not help. How do I fix this?
    Many thanks in advance.

    Hmm that's a puzzler. I would love to see a complete (but minimal) example of this.
    You might get more insight by using a different compiler, since you'd get a different version of the error message. Some compilers are more lucid than others.

  • Non-final variable inside an inner class - my nemisis

    I have an issue with accessing variables from an inner method. This structure seems to allow access to the text objects but not to the button object. This comes from a bit of example code that just illustrates a simple form window with text fields and buttons that read them.
    At the start of the class I have text objects defined like this:
    public class SimpleGUI extends Composite {
    Text nameField;
    Text junkField;
    // Constructors come next, etc...
    Later within this class there is a method to create some GUI stuff, and then to create a button and when pressed access and print the text to the console
    protected void createGui(){
    junkField = new Text(entryGroup,SWT.SINGLE); //Ross
    junkField.setText("Howdy");
    Button OKbutton = new Button(buttons,SWT.NONE);
    OKbutton.setText("Ok");
    OKbutton.addSelectionListener(
    new MySelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
    System.out.println("Name: " + nameField.getText());
    System.out.println("Junk: " + junkField.getText());
    And that all works fine. So within the inner class, the object junkField can be accessed nicely.
    However if I try to do the same with the button (I want to change the label on the button after it's pressed) I get errors for trying to access a non-final object in an inner class.
    I tried to handle the button similar to the text, adding this after the text defs:
         Button myButton;
    and under the println's in the inner class I wanted:
    if OKbutton.getText.equals("OK") {  OKbutton.setText("NotOK")}
    That's when I get an issue with "cannot refer to a non-final variable inside an inside class defined in a different method"
    Now, if I move the button declaration into the createGui method, and declare it with "final Button myButton" it works.
    Why does the button need different treatment than the text?
    Is this a suitable method to make my button change it's label when pressed, or is this sloppy?

    Button is a local variable. The anonymous inner class object you create can continue to exist after the method ends, but the local variables will not. Therefore, as the error message says, you must make that local button variable final if you want to refer to it inside the anon inner class. If it's final, a copy of its value can be given to the inner class--there's no need to treat it as "variable."

  • Where can I declare a final variable?

    I'm wondering where excatly I can declare a final variable. I know I can declare them right after I start the class.
    i.e.:
    public class x {
         public static final Scanner CONSOLE = new Scanner(System.in);
         public static final Random GENERATOR = new Random();
    }I would like to declare a final within the main method. i.e.:
         public static void main(String[] args) {
              System.out.print("Please type in your name and press return: ");
              final String NAME = CONSOLE.next();
         }Is this just not possible or am I just writing it wrong? Couldn't find an example using google. Any help?
    fyi: I'm fairly new to using java so this may be obvious.

         public static void main(String[] args) {
    System.out.print("Please type in your name and
    nd press return: ");
              final String NAME = CONSOLE.next();
         }Is this just not possible or am I just writing it
    wrong?No, you can declare a local variable final, which means that it's value can only be set once in or after the declaration. But be aware that a new variable is created each time the method is invoked.
    About the only reason people do this is so it can be used in a local class declared further down the method.

  • Problem with final variables and inner classes

    variables accessed by inner classes need to be final. Else it gives compilation error. Such clases work finw from prompt. But when I try to run such classes through webstart it gives me error/exception for those final variables being accessed from inner class.
    Is there any solution to this?
    Exception is:
    java.lang.ClassFormatError: com/icorbroker/fx/client/screens/batchorder/BatchOrderFrame$2 (Illegal Variable name " val$l_table")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$1(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderFrame.<init>(BatchOrderFrame.java:217)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderViewController.createView(BatchOrderViewController.java:150)
         at com.icorbroker.fx.client.screens.RealTimeViewController.initialize(RealTimeViewController.java:23)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderViewController.<init>(BatchOrderViewController.java:62)
         at com.icorbroker.fx.client.screens.displayelements.DisplayPanel$3.mousePressed(DisplayPanel.java:267)
         at java.awt.Component.processMouseEvent(Component.java:5131)
         at java.awt.Component.processEvent(Component.java:4931)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3639)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Window.dispatchEventImpl(Window.java:1590)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

    I've also been having the same problem. The only work-around seems to be to slightly change the code, recompile & hope it works. See http://forum.java.sun.com/thread.jsp?forum=38&thread=372291

  • Problem with final variables and inner classes (JDK1.1.8)

    When using JDK1.1.8, I came up with following:
    public class Outer
        protected final int i;
        protected Inner inner = null;
        public Outer(int value)
            i = value;
            inner = new Inner();
            inner.foo();
        protected class Inner
            public void foo()
                System.out.println(i);
    }causing this:
    Outer.java:6: Blank final variable 'i' may not have been initialized. It must be assigned a value in an initializer, or in every constructor.
    public Outer(int value)
    ^
    1 error
    With JDK 1.3 this works just fine, as it does with 1.1.8 if
    1) I don't use inner class, or
    2) I assign the value in initializer, or
    3) I leave the keyword final away.
    and none of these is actually an option for me, neither using a newer JDK, if only there is another way to solve this.
    Reasons why I am trying to do this:
    1) I can't use a newer JDK
    2) I want to be able to assign the variables value in constructor
    3) I want to prevent anyone (including myself ;)) from changing the value in other parts of the class (yes, the code above is just to give you the idea, not the whole code)
    4) I must be able to use inner classes
    So, does anyone have a suggestion how to solve this problem of mine? Or can someone say that this is a JDK 1.1.8 feature, and that I just have to live with it? In that case, sticking to solution 3 is probably the best alternative here, at least for me (and hope that no-one will change the variables value). Or is it crappy planning..?

    You cannot use a final field if you do not
    initialize it at the time of declaration. So yes,
    your design is invalid.Sorry if I am being a bit too stubborn or something. :) I am just honestly a bit puzzled, since... If I cannot use a final field in an aforementioned situation, why does following work? (JDK 1.3.1 on Linux)
    public class Outer {
            protected final String str;
            public Outer(String paramStr) {
                    str = paramStr;
                    Inner in = new Inner();
                    in.foo();
            public void foo() {
                    System.out.println("Outer.foo(): " + str);
            public static void main( String args[] ) {
                    String param = new String("This is test.");
                    Outer outer = new Outer(param);
                    outer.foo();
            protected class Inner {
                    public void foo() {
                            System.out.println("Inner.foo(): " + str);
    } producing the following:
    [1:39] % javac Outer.java
    [1:39] % java Outer
    Inner.foo(): This is test.
    Outer.foo(): This is test.
    Is this then an "undocumented feature", working even though it shouldn't work?
    However, I assume you could
    get by with eliminating the final field and simply
    passing the value directly to the Inner class's
    constructor. if not, you'll have to rethink larger
    aspects of your design.I guess this is the way it must be done.
    Jussi

  • HELP: Cannot refer to non-final variable inside inner class

    Below is a function that WAS working beautifully. I had to restructure many things in my code base to suit a major change and I have to make this function static. Since I made this function static, I get some errors which are displayed in comments next to the line of code.
    Can anyone offer any advice how to fix this?
    static private void patchSource( final Target target, final TargetResolver resolver, final TexSheetCommand args ) throws Exception
         boolean bDone = false;
         Element e;
         SAXReader sax          = new SAXReader();
         FileInputStream fis     = new FileInputStream( args.getInputFile() );
         Document document     = sax.read( fis );
         Element root = document.getRootElement();
         if( root.getName().equals( "Sheet" ) )
              XMLParser.iterateElements( root,     new XMLElementCallback()
                                                      public void onElement( Element element )
                                                           XMLParser.iterateAttributes( element,     new XMLAttributeCallback()
                                                                                                   public void onAttribute( Element element, Attribute attribute )
                                                                                                        if( attribute.getName().equals( "guid" ) )
                                                                                                             e = element; // PROBLEM: Cannot refer to a non-final variable e inside an inner class defined in a different method
                                                                                                             // WARNING: Type safety: The expression of type Iterator needs unchecked conversion to conform to Iterator<Attribute>
                                                                                                             for( Iterator<Attribute> it = element.attributeIterator(); it.hasNext(); )
                                                                                                                  Attribute a = (Attribute)it.next();
                                                                                                                  if( a.getName().equals( "randOffset" ) )
                                                                                                                       Integer i = new Integer( resolver.getTotalPermutations() );
                                                                                                                       a.setValue( i.toString() );
                                                                                                                       bDone = true; // PROBLEM: Cannot refer to a non-final variable bDone inside an inner class defined in a different method
              if( ( !bDone ) && ( e != null ) )
                   Integer i = new Integer( resolver.getTotalPermutations() );
                   e.addAttribute( "randOffset", i.toString() );                                                                                                                                            
         FileOutputStream fileOut     = new FileOutputStream( args.getInputFile() );          
         OutputFormat format               = OutputFormat.createPrettyPrint();          
            XMLWriter xmlWriter               = new XMLWriter( fileOut, format );
            xmlWriter.write( document );
            fileOut.close();
    }PS.) on a side note there is a warning on one of the lines too. Can anyone offer help on that one too?!
    Thanks in advance.

    It is already set to that - it does look correct in Eclipse, honest.
    It's just the block that's gone crazy with the formatting. I've spent around 10 minutes trying to tweak it just so it displays correctly but it wasn't making sense.
    I'd rather not turn this conversation into a judgement of my code-style - I already understand that it doesn't conform to the 'Java way' and I've had Java programmers bash me about it for a long time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can the output of a Generate Occurrence be passed in Local/Global Variable?

    Can the output of a Generate Occurrence function, which is a refnum, be passed in Local/Global Variable so that it does not need to be wired to all parties directly?
    Can more than one party be waiting on the same Occurrence and will all waiting function be released together?

    dbaechtel wrote:
    Answer was not given:
    Can the output of a Generate Occurrence function, which is a refnum, be passed in Local/Global Variable so that it does not need to be wired to all parties directly? Is this possible?
    I am not worried about whether it is bad form or not, as yet. That is for me to decide on a case by case basis.
    Yikes! That is not a very good way to learn.
    Anyways, to avoid any more bold emphasis on words, I will answer your question. Locals can only be linked to controls/indicators not individual wires. If you want to get the effect of a local/global variable with a wire value, search the forum for action engines or functional globals. Those will work for passing a wire value between threads.
    That said, what are you trying to use occurences for? There may be (and probably is) a more accepted way to implement what you are trying to do instead of using local variables
    CLA, LabVIEW Versions 2010-2013

  • How to... get local fox variable into WAD

    Hi guys,
    we have a (technical) weird requirement to fullfill. There is a parameter (a string) we need to update several times when running our web templates. We have this parameter in our fox coding and it needs to be updated i.e. when loading the templates the first time, when buttons are triggered etc (if we use a customer exit we can not update the parameter when i.e. a button is triggered).
    What do we need this parameter for? We have to display it in a text field in our templates (it must not be a text field but it has to be present all the time in these about 70 templates). However if we use a text field the best would be to link the parameter using a variable. Anyway I do not know how to set a global variable within fox coding...
    What do you suggest? How can a global variable be set using fox the easiest way? Or is there any other way to display a local fox variable in WAD (using javascript or something else)?
    Any helpful ideas or answers will be <removed by moderator>.
    Thks & Brgds,
    Marcel
    Edited by: Siegfried Szameitat on Dec 3, 2008 3:04 PM

    Your requirement didn't get very clear to me but maybe you can explore whether you can achieve it by calling an FM from inside the fox code.

Maybe you are looking for

  • Minus and - not working in query

    Hi all, I am operating on 10G R/2. I have thsi query where thi sstatement <pre>(COUNT(W_O) - COUNT(W_I))</pre> TOTAL is returning 0.Why is the minus and '-' not working out in this query?. <Pre> SELECT TRUNC(DT) week_start , next_day (TRUNC( DT) - 7,

  • Solaris 10 installation help

    has anyone installed solaris 10 on t60 with windows vista running? its failing on http://forum.java.sun.com/thread.jspa?threadID=5137822 step 23. please help .. any help would be greatly appreciated. Thank You Ben

  • Email adress used to send the password after a password reset

    Hi, I finally got the ampassword webapp to email the new password. Now emails are being sent by a Lotus Notes server. This server is reached thanks to sendmail. I'd like to know where I can configure the email address of the sender of the mail Thanks

  • Use Validation at Create Purchase Order stage.

    I have created a validation to ensure that a limited range of GL accounts are used with a certain Internal Order type. The majority of costs hitting these orders will come from Purchase Orders.  The Validation seems to work, stopping things at the go

  • Financial Statement SQL Queries

    I'm trying to build our financial statements in Crystal Reports, and I'd rather not have to build the logic from scratch.  Where is the code stored in B1 that runs the balance sheet and income statements?  I'd like to use that as my base SQL for Crys