Character comparison.

Hi Friends,
          We have a scenario in which a database table field is of type CHAR10.
Selection screen parameter is as well defined using the same field.
Actually this represents a number but is defined as character.
Now, due to character comparison we get false results when user enters a number on that selection screen.
For ex: 133.33 is evaluated greater then 1000 and the like. This is because of character comparison.
Could someone help me how can i get correct result here?
Is there some way that i dont have to change the field type in DDIC to number, and still i can get number comparison instead of character comparison?
Thanks,
Rohit.

Hi,
  The character comparison indeed gives the wrong result.
check this code:
data : x1 type char10, x2 type char10.
x1 = '133.35'.
x2 =  '1000'.
if ( x2 > x1 ).
   write ' successful'.
   write x1.
endif.
if ( x1 > x2 ).
   write 'unsuccessful'.
endif.
Also it wont be possible to assing char to num as you have mentioned, because comparison is done with database table field, which is character and not a number!
Thanks,
Rohit.

Similar Messages

  • Help need to convert hsa prog to an applet

    Hey everybody I have no clue what i am doin im trying to convert a mathquiz program from the hsa console to an applet. ive attached my hsa code:
    import java.awt.*;
    import hsa.Console;
    import java.io.*;
    public class MathQuizhsa
    static Console c; // The output "c" Console.
    public static void main (String[] args)
    c = new Console ();
    char cont;
    String name1, name2, name3;
    //Start Of Loop.
    while (true)
    // Varible declaration
    int scorechart = 0;
    int scorechart1 = 300;
    //Start of score reset
    int score = 0;
    //End of score reset
    // Display Code
    c.clear ();
    c.println ("\t\t\t\tMath Quiz");
    c.println ("\n\tType:");
    c.println ("\t1 for Easy");
    c.println ("\t2 for Medium");
    c.println ("\t3 for Hard");
    c.println ("\t4 for High Scores");
    c.println ("\t5 for HighScore Setup and reset");
    c.println ("\t6 or more to Exit");
    c.print ("\nEnter Choice Here: ");
    int dec = c.readInt ();
    c.clear ();
    // End of Display Code
    // Starting Of Easy code!....................................
    if (dec == 1)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.println ("MATH QUIZ..... EASY");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (15));
    int num2;
    num2 = (int) (Math.random () * (15));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    c.clear ();
    // End Of Easy Code!.........................................
    // Starting Of Medium code!....................................
    if (dec == 2)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.setCursor (1, 1);
    c.println ("MATH QUIZ..... MEDIUM");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (50));
    int num2;
    num2 = (int) (Math.random () * (50));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    // End Of Medium Code!.........................................
    // Starting Of Hard code!....................................
    if (dec == 3)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.setCursor (1, 1);
    c.println ("MATH QUIZ..... HARD");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (100));
    int num2;
    num2 = (int) (Math.random () * (100));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    // End Of Hard Code!.........................................
    // Start of highscore page!..................................
    else if (dec == 4)
    BufferedReader easyhigh1;
    BufferedReader easyhigh2;
    BufferedReader medhigh1;
    BufferedReader medhigh2;
    BufferedReader hardhigh1;
    BufferedReader hardhigh2;
    c.clear ();
    c.println ("\n\t\t\t\tHigh Scores!!");
    try
    //Easy highscore read start............
    String EasyHighnum, EasyHighname;
    easyhigh1 = new BufferedReader (new FileReader ("EasyHighscore.score"));
    EasyHighnum = easyhigh1.readLine ();
    easyhigh2 = new BufferedReader (new FileReader ("EasyName.score"));
    EasyHighname = easyhigh2.readLine ();
    c.println ("\t\t\t Press any key to exit!");
    c.println ("\nEasy High Scores!..");
    c.println ("\n\t" + EasyHighname);
    c.println ("\t\t\t\t\t\t\t\t" + EasyHighnum);
    //Easy highscore read end..............
    //Med highscore read start............
    String MedHighnum, MedHighname;
    medhigh1 = new BufferedReader (new FileReader ("MedHighscore.score"));
    MedHighnum = medhigh1.readLine ();
    medhigh2 = new BufferedReader (new FileReader ("MedName.score"));
    MedHighname = medhigh2.readLine ();
    c.println ("\nMedium High Scores!..");
    c.println ("\n\t" + MedHighname);
    c.println ("\t\t\t\t\t\t\t\t" + MedHighnum);
    //Med highscore read End..............
    //Hard highscore read start............
    String HardHighnum = "";
    String HardHighname = "";
    hardhigh1 = new BufferedReader (new FileReader ("HardHighscore.score"));
    HardHighnum = hardhigh1.readLine ();
    hardhigh2 = new BufferedReader (new FileReader ("HardName.score"));
    HardHighname = hardhigh2.readLine ();
    c.println ("\nHard High Scores!..");
    c.println ("\n\t" + HardHighname);
    c.println ("\t\t\t\t\t\t\t\t" + HardHighnum);
    //Hard highscore read End..............
    char ans = c.getChar ();
    catch (FileNotFoundException e)
    c.println ("\nHighscore files missing! Please run option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    return;
    finally
    continue;
    // End of highscore page!....................................
    // Start of highscore setup
    else if (dec == 5)
    try
    //easy file write
    PrintWriter out
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyHighscore.score")));
    out.print ("0");
    out.close ();
    PrintWriter out2
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyName.score")));
    out2.print ("NoName");
    out2.close ();
    //med file write
    PrintWriter out3
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedHighscore.score")));
    out3.print ("0");
    out3.close ();
    PrintWriter out4
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedName.score")));
    out4.print ("NoName");
    out4.close ();
    //hard file write
    PrintWriter out5
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardHighscore.score")));
    out5.print ("0");
    out5.close ();
    PrintWriter out6
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardName.score")));
    out6.print ("NoName");
    out6.close ();
    c.print ("Installing.");
    int loadbar = 5;
    for (int ii = 0 ; ii <= 20 ; ii++)
    c.print (".");
    c.setColor (Color.black);
    c.drawRect (5, 20, 205, 18);
    c.setColor (Color.blue);
    c.fillRect (5, 20, loadbar, 18);
    loadbar = loadbar + 10;
    c.setCursor (3, 1);
    c.print ((ii * 5) + "%");
    Thread.sleep (100);
    c.println ("\nYour Highscores are now reset and installed.");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    finally
    continue;
    // End of highscore setup
    // Start Of End Code!........................................
    else if (dec >= 6)
    System.exit (0);
    // Start Of End Code!........................................
    // Score Code................................................
    if (dec >= 1 & dec <= 3)
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    if (score == 0)
    c.println ("Wow... That was horrible: " + score + " out of 10!");
    else if (score == 1)
    c.println ("Go Back To Kindergarten: " + score + " out of 10!");
    else if (score == 2)
    c.println ("Pitiful: " + score + " out of 10!");
    else if (score == 3)
    c.println ("You Suck: " + score + " out of 10!");
    else if (score == 4)
    c.println ("Awesome if your six: " + score + " out of 10!");
    else if (score == 5)
    c.println ("Cant complain with a pass: " + score + " out of 10!");
    else if (score == 6)
    c.println ("Barely: " + score + " out of 10!");
    else if (score == 7)
    c.println ("Ill give u a E for effort: " + score + " out of 10!");
    else if (score == 8)
    c.println ("Wow: " + score + " out of 10!");
    else if (score == 9)
    c.println ("Nerd: " + score + " out of 10!");
    else if (score == 10)
    c.println ("Your Score Was Perfect: " + score + " out of 10!");
    c.println ("Press any key to continue");
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    cont = c.getChar ();
    c.clear ();
    else
    // Score Code................................................
    // Easy High Score Code...........................................
    if (dec == 1)
    BufferedReader file1;
    try
    file1 = new BufferedReader (new FileReader ("EasyHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore1 = file1.read ();
    if (highscore1 == 48)
    highscore1 = 0;
    else if (highscore1 == 49)
    highscore1 = 1;
    else if (highscore1 == 50)
    highscore1 = 2;
    else if (highscore1 == 51)
    highscore1 = 3;
    else if (highscore1 == 52)
    highscore1 = 4;
    else if (highscore1 == 53)
    highscore1 = 5;
    else if (highscore1 == 54)
    highscore1 = 6;
    else if (highscore1 == 55)
    highscore1 = 7;
    else if (highscore1 == 56)
    highscore1 = 8;
    else if (highscore1 == 57)
    highscore1 = 9;
    else if (highscore1 == 58)
    highscore1 = 10;
    if (score >= highscore1)
    highscore1 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name1 = c.readLine ();
    try
    PrintWriter out
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyHighscore.score")));
    out.print (highscore1);
    out.close ();
    PrintWriter out2
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyName.score")));
    out2.print (name1);
    out2.close ();
    finally
    continue;
    finally
    continue;
    // End Easy High Score Code...........................................
    // Medium High Score Code...........................................
    else if (dec == 2)
    BufferedReader file2;
    try
    file2 = new BufferedReader (new FileReader ("MedHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore2 = file2.read ();
    if (highscore2 == 48)
    highscore2 = 0;
    else if (highscore2 == 49)
    highscore2 = 1;
    else if (highscore2 == 50)
    highscore2 = 2;
    else if (highscore2 == 51)
    highscore2 = 3;
    else if (highscore2 == 52)
    highscore2 = 4;
    else if (highscore2 == 53)
    highscore2 = 5;
    else if (highscore2 == 54)
    highscore2 = 6;
    else if (highscore2 == 55)
    highscore2 = 7;
    else if (highscore2 == 56)
    highscore2 = 8;
    else if (highscore2 == 57)
    highscore2 = 9;
    else if (highscore2 == 58)
    highscore2 = 10;
    if (score >= highscore2)
    highscore2 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name2 = c.readLine ();
    try
    PrintWriter out3
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedHighscore.score")));
    out3.print (highscore2);
    out3.close ();
    PrintWriter out4
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedName.score")));
    out4.print (name2);
    out4.close ();
    finally
    continue;
    finally
    continue;
    // End Medium High Score Code...........................................
    // Hard High Score Code...........................................
    else if (dec == 3)
    BufferedReader file3;
    try
    file3 = new BufferedReader (new FileReader ("HardHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore3 = file3.read ();
    if (highscore3 == 48)
    highscore3 = 0;
    else if (highscore3 == 49)
    highscore3 = 1;
    else if (highscore3 == 50)
    highscore3 = 2;
    else if (highscore3 == 51)
    highscore3 = 3;
    else if (highscore3 == 52)
    highscore3 = 4;
    else if (highscore3 == 53)
    highscore3 = 5;
    else if (highscore3 == 54)
    highscore3 = 6;
    else if (highscore3 == 55)
    highscore3 = 7;
    else if (highscore3 == 56)
    highscore3 = 8;
    else if (highscore3 == 57)
    highscore3 = 9;
    else if (highscore3 == 58)
    highscore3 = 10;
    if (score >= highscore3)
    highscore3 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name3 = c.readLine ();
    try
    PrintWriter out5
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardHighscore.score")));
    out5.print (highscore3);
    out5.close ();
    PrintWriter out6
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardName.score")));
    out6.print (name3);
    out6.close ();
    finally
    continue;
    finally
    continue;
    // End Hard High Score Code...........................................
    //End Of Loop.
    // Place your program here.
    } // main method
    } // MathQuiz class

    Most of the awt drawing methods are the same; you just need to provide a panel that calls them in its paint() method.
    You also need to add text fields for any inputs, and buttons or a combo box for choosing the skill level.
    You need to store high scores on the server as there is no way for an applet to access a local file.
    The code int highscore1 = file1.read ();
    if (highscore1 == 48)
    ...would better read in a string then use Integer.parseInt() rather than all those character comparisons, or one of the Character.digit() conversions.
    The code that is many versions of if (score == 0)
    c.println ("Wow... That was horrible: " + score + " out of 10!");
    ...can either be replaced with switch/case or an array of strings.
    You'd be better off reducing all the code you don't need before you convert it to an applet, just so there's only half the amount to convert.
    Pete

  • ABAP/4 Keywords for all SAP R/3 Versions

    Hello Experts,
          Is there any DB Table available in Data Dictionary where all these ABAP/4 Keywords available; if yes do please let me know if not available then do please provide me with all ABAP/4 Keywords of all versions of SAP R/3 if possible
    points will be awarded if helpful.
    Thanks in Advance

    Hello Arif,
    There no particular table to check all the key words in ABAP.
    To check system fields Go for
    Se11-- SYST.
    TO get the key words go to ABAPDOCU- type ur required key word in the search given in the last section.
    The best option would be to debug ABAPDOCU, when you do a click on Keywords
    Or Check the Pooled table : TSE05
    As you must be knowing ABAPDOCU is in SABAPDOCU Package.....!!
    There are a number of tables used; like ABTREE,etc !
    Explore and find whether you can get some clue!
    Find the keywords here...
    Keywords     Description
    , [, ], {, }     Syntax conventions, Syntax notation
    *, "     Comments
    **     Arithm. Operator: Exponentiation (COMPUTE)
    +, -, *, /     Arithmetical operators (COMPUTE)
    ->, =>, ->>, ~, ?=     Operators in ABAP Objects
    ABS     Mathematical function: Absolute amount COMPUTE)
    ACOS     Mathematical function: Cosine arc (COMPUTE)
    ADD     Add
    ADD-CORRESPONDING     Field string addition
    ADJACENT DUPLICATES     Delete duplicates from internal table (DELETE)
    AND     Comparison operator: and
    ANY TABLE     Generic table type for internal tables
    APPEND     Append line to internaltable
    ASIN     Mathematical function: Sine arc (COMPUTE)
    ASSIGN     Assign field symbol
    AT     Event, control break, field group determination
    ATAN     Mathematical function: Tangent  arc
    AUTHORITY-CHECK     Check authorization
    AVG     Aggregate expression: Average (SELECT)
    BACK     Positioning in list
    BETWEEN     Relational operator: Between
    BINARY SEARCH     Binary read of internaltable (READ TABLE)
      BIT-NOT     Bit calculation operator: NOT (COMPUTE)
      BIT-AND     Bit calculation operator: AND (COMPUTE)
      BIT-OR     Bit calculation operator: OR (COMPUTE)
      BIT-XOR     Bit calculation operator: AND/OR (COMPUTE)
      SET BIT     Set bit of an X field
      GET BIT     Read bit of an X field
    BLANK LINES     Switch on blank lines in list
    BREAK-POINT     Stop processing in debug mode
    C     Data type for fixed-length character string
    CA     Contains any characters -Relational operator forstring comparison
    CALL     Call external component
    CASE     Begin case distinction
    CATCH     Exception handling (catch runtime errors)
    CEIL     Mathematical function: Smallest whole value
    CENTERED     Output format: Centered(WRITE)
    CHECK     Check condition
    CHECKBOX      Display as checkbox
      PARAMETERS ... AS CHECKBOX     on the selection screen
      WRITE ... AS CHECKBOX     in a list
    CLASS     Definition of a class
    CLASS-DATA     Static attributes in classes
    CLASS-METHODS     Static methods in classes
    CLASS-EVENTS     Static events in classes
    CLASS-POOL     Introduction for type Kprograms
    CLEAR     Initialize data object
    CLIENT       Client handling when
      DELETE ... CLIENT SPECIFIED     deleting from a database
      EXPORT ... TO DATABASE ... CLIENT     Storing a data cluster
      IMPORT ... FROM DATABASE ... CLIENT     Reading a data cluster
      EXPORT ... TO SHARED BUFFER ... CLIENT     Storing a data cluster
      IMPORT ... FROM SHARED BUFFER ... CLIENT     Reading a data cluster
      INSERT ... CLIENT SPECIFIED     inserting into a database
      MODIFY ... CLIENT SPECIFIED     Insert/Modify in database(s)
      SELECT ... CLIENT SPECIFIED     reading from a database
      UPDATE ... CLIENT SPECIFIED     updating a database
    CLOSE     Close file/cursor
    CN     Contains Not Only - Relational operator for character comparison:
    CNT     Field groups: Number ofdifferent values
    CO     Contains Only - Relational operator for character comparison:
    CODE PAGE              Character set
      TRANSLATE ... FROM/TOCODE PAGE     Translate character codes
    COLLECT     Internal table: Add entries
    COLOR     Output format: Color (FORMAT)
    COMMENT                  Comment on selection screen
      SELECTION-SCREEN COMMENT     Generate comment
    COMMIT     Close processing unit
    COMMUNICATION     Data exchange
    COMPUTE     Perform calculations
    CONCATENATE     Concatenate character fields
    CONDENSE     Condense character fields
    CONSTANTS     Defing constants
    CONTEXTS     Communicate contexts
    CONTINUE     Exit current loop pass
    CONTROLS     Define controls for visualization
    CONVERT     Convert fields
    COS     Mathematical function: Cosine (COMPUTE)
    COSH     Mathematical function: Hyperbola cosine (COMPUTE)
    COUNT     Aggregate expression: Count (SELECT)
    COUNTRY     Set country ID (SET)
    CP     Relational operator forcharacter comparison:
    DATABASE                Contains Pattern
    CREATE     Generate an object or data object
    CS     Contains character - Relational operator forcharacter comparison
    CURRENCY     Output format: Correct format for currency (WRITE)
    CURSOR                   Cursor
      CLOSE                Close database cursor
      FETCH NEXT CURSOR     Read lines with a database cursor
      GET CURSOR FIELD        Get field name
      OPEN CURSOR            Open database cursor
      SET CURSOR            Position cursor
    CUSTOMER-FUNCTION      Call customer enhancement
    DATA     Define data
    DATABASE               Data cluster
      DELETE FROM DATABASE        Delete from a database table
      EXPORT ... TO DATABASE        Store in a databasetable
      IMPORT ... FROM DATABASE     Read from a database table
    DATASET                 Sequential file
      CLOSE DATASET          Close file
      DELETE DATASET        Delete file
      EXPORT ... TO DATASET        Store data cluster in file
      IMPORT ... FROM DATASET       Read data cluster from file
      OPEN DATASET    Open file     Open file
      READ DATASET        Read from a file
      TRANSFER       Output to a file
    DECIMALS     Output format: Places after the decimal point - (WRITE)
    DEFINE     Define macro
    DELETE     Delete from tables or from objects
    DEMAND     Request information from a context
    DESCRIBE     Determine attributes ofdata objects
    DIALOG     Call a dialog module (CALL)
    DISTINCT            Duplicates
      SELECT DISTINCT          Selection set without duplicates
      AVG( DISTINCT ... )        Average without duplicates (SELECT)
      COUNT( DISTINCT ... )        Sequential file
      MAX( DISTINCT ... )      Maximum without duplicates (SELECT)
      MIN( DISTINCT ... )      Minimum without duplicates (SELECT)
      SUM( DISTINCT ... )     Sum without duplicates (SELECT)
    DIV     Arithmetic operator: Whole number division
    DIVIDE     Divide
    DIVIDE-CORRESPONDINGField string division     Field string division
    DO     Loop
    DYNPRO               Screen      Screen
      DELETE DYNPRO    Delete     Delete
      EXPORT DYNPRO    Export     Export
      GENERATE DYNPRO    Generate     Generate
      IMPORT DYNPRO    Import      Import
      SYNTAX-CHECK FOR DYNPRO   Check     Check
    EDITOR-CALL     Call editor
    ELSE     Query
    ELSEIF     Query
    END-OF-DEFINITION     End of a macro definition
    END-OF-PAGE     Event: End of page handling in lists
    END-OF-SELECTION     Event: After processingof all records in a LDB
    ENDAT     End of an event introduced by AT
    ENDCASE     End of case distinction
    ENDCATCH     End of exception handling
    ENDDO     End of a DO loop
    ENDEXEC     End of a Native SQL statement
    ENDFORM     End of a subroutine
    ENDFUNCTION     End of a function module
    ENDIF     End of a query
    ENDINTERFACE     End of an interface definition
    ENDLOOP     End of a LOOP
    ENDMODULE     End of a module definition
    ENDON     End of a conditional statement
    ENDPROVIDE     End of a PROVIDE loop
    ENDSELECT     End of a SELECT loop
    ENDWHILE     End of a WHILE loop
    EQ     Relational operator: Equals
    EXEC SQL     Native SQL statement
    EXIT     Exit loop or terminate processing
    EXP     Mathematical function: Exponential function
    EXPONENT     Output format: Exponentdisplay (WRITE)
    EXPORT     Export data
    EXTENDED CHECK     Switch extended syntax check on/off (SET)
    EXTRACT     Generate extract dataset
    FETCH     Read line from a database table
    FIELD-GROUPS     Define field groups
    FIELD-SYMBOLS     Define field symbols
    FLOOR     Mathematical function:Largest whole value
    FORM     Define subroutine
    FORMAT     Output format for lists
    FOR UPDATE     Read database table with lock (SELECT)
    FRAC     Mathematical function: Fraction (COMPUTE)
    FREE     Release resources no longer needed
    FUNCTION     Define function module
      CALL FUNCTION     Call function module
    FUNCTION-POOL     Introduction for type Fprograms
    GE     Relational operator: Greater than or equal
    GENERATE     Generate a program or screen
    GET     Event, read settings
    GT     Relational operator: Greater than
    HASHED TABLE     Table type for internalhashed tables
    HEADER LINE     Define an internal table with header line (DATA)
    HELP-ID                Help ID for F1 help
      DESCRIBE FIELD ... HELP-ID      Determine help ID
    HELP-REQUEST              Self-programmed help (F1)
      PARAMETERS ... HELP-REQUEST          for parameters
      SELECT-OPTIONS ... HELP-REQUEST      for selection options
    HIDE     Store line information
    HOTSPOT     Output format: Hotspot,interaction by simple - mouse click (FORMAT)
    ICON     Icons in lists
    IF     Query
    IMPORT     Import data or a screen
    IN     Relational operator: Selection criterion
    INCLUDE     Include program components
    INDEX                    Line index in an internal table
    INDEX TABLE     
      DELETE ... INDEX     Delete line
      INSERT ... INDEX     Insert line
      MODIFY ... INDEX     Modify line
      READ TABLE ... INDEX     Read line
    INFOTYPES     Declare HR info type
    INITIAL     Relational operator: Initial value
    INITIAL SIZE     Define an internal table type (TYPES)
    INITIALIZATION     Event: Before display of the selection screen
    INPUT     Output format: Ready for input (FORMAT)
    INSERT     Insert into tables or objects
    INTENSIFIED     Output format: Intensified (FORMAT)
    INTERFACE     Definition of an interface
    INTERFACES     Class component interface
    INTERFACE-POOL     Introduction fortype J programs
    INVERSE     Output format: Inverse (FORMAT)
    IS                 Relational operator
      IS ASSIGNED      Relational operator: Is the field symbol assigned?
      IS INITIAL             Relational operator: Initial value
      IS REQUESTED          Relational operator: Existence of a formal
    parameter     
    JOIN     Join (SELECT)
    LANGUAGE     Set language for text elements (SET)
    LE     Relational operator: Less than or equal
    LEAVE     Leave processing
    LEFT-JUSTIFIED     Output format: Left-justified (WRITE)
    LIKE                     Use an existing field as areference
      TYPES ... LIKE     Create a type
      DATA ... LIKE     Create a field
    LINE                      Line in a list
      MODIFY LINE     Modify line
      READ LINE             Read line
    LINE-COUNT     Number of lines per page (NEW-PAGE)
    LINE-SIZE     Line size (NEW-PAGE)
    LIST-PROCESSING          List processing (LEAVE)
    LOAD     Load program componentsin internal table
    LOAD-OF-PROGRAM          Execution at load time
    LOCAL     Rescue actual parameters of a subroutine
    LOCAL COPY     Assign local copy to a field symbol
    LOCALE     Set text environment (SET)
       SET LOCALE     Set text environment
       GET LOCALE     Determine text environment
    LOG     Mathematical function: Natural logarithm (COMPUTE)
    Logical condition     
      SELECT ... WHERE         when reading database tables
      UPDATE ... WHERE         when changing database tables
      DELETE ... WHERE         when deleting fromdatabase tables
      SELECT ... FROM ... ON        when reading usinga join
    LOG10     Mathematical function: Base 10 logarithm (COMPUTE)
    LOOP     Loop
    LT     Relational operator: Less than
    M     Relational operator: Byte contains zeros and ones
    MARGIN     List output: Distance from edge (SET)
    MATCHCODE            Matchcode handling
    PARAMETERS ... MATCHCODE          for parameters
      SELECT-OPTIONS ... MATCHCODE      for selection options
    MAX     Aggregate expression: Maximum (SELECT)
    MEMORY                    ABAP/4 memory
      EXPORT ... TO MEMORY      Roll out data to memory
      IMPORT ... FROM MEMORY     Restore data from memory
    MESSAGE     Output message
    MESSAGE-ID     Specify message class (REPORT)
    METHOD     Definition of a method
    METHODS     Class component method
    MIN     Aggregate expression: Minimum (SELECT)
    MOD     Arithmetic operator: Remainder after division
         (COMPUTE)
    MODIFY     Modify tables or objects
    MODULE     Flow logic: Module
    MOVE     Assignment
    MOVE-CORRESPONDING       Component-by-component assignment
    MULTIPLY     Multiply
    MULTIPLY-CORRESPONDING     Field string multiplication
    NA     Relational operator forcharacter comparison:
         Contains not any characters
    NE     Relational operator: Not equal
    NEW-LINE     List processing: New line
    NEW-PAGE     List processing: New page
    NODES     Interface work area forlogical databases
    NO-GAP     Output format: Leave nogaps (WRITE)
    NO-HEADING     Display no column headers (NEW-PAGE)
    NO-SCROLLING     Do not scroll line (NEW-LINE)
    NO-SIGN     Output format: No preceding signs (WRITE)
    NO-TITLE     Do not display standardpage header (NEW-PAGE)
    NO-ZERO     Output format: No leading zeros (WRITE)
    NON-UNIQUE               Defines an
      TYPES     internal table type
      DATA                   internal table object
    NP     Relational operator forcharacter comparison:
         Does not contain pattern
    NS     Relational operator forcharacter comparison:
         Does not contain character
    O     Relational operator: Byte positions occupied by1
    OBJECT                External object
      CREATE OBJECT     Generate
      FREE OBJECT       Release
    OCCURS       Defines an
      TYPES     internal table type
      DATA                   internal table object
    ON CHANGE     Control break
    OPEN     Open file/cursor
    OR     Relational operator: OR
    ORDER BY     Sort table rows (SELECT)
    OVERLAY     Overlay character fields
    PACK     Conversion
    PARAMETER                Parameter in global SAP memory
      GET     Read parameter
      SET     Set parameter
    PARAMETERS     Define report parameters
    PERFORM     Execute subroutine
    PF-STATUS     Set GUI status
    POSITION     List processing: Defineoutput position
    PRINT     Print formatting (NEW-PAGE)
    PRINT-CONTROL     Define print format
    PRIVATE     Class area not visible from outside
    PROGRAM     Introduction for type Mand S programs
      LEAVE PROGRAM     Leave program
    PROPERTY                 Object property
      GET PROPERTY     Get property
      SET PROPERTY     Set property
    PROVIDE     Internal tables: Interval-related processing
    PUT     Trigger event
    RADIOBUTTON     Radio button (PARAMETERS)
    RAISE     Raise exceptions and events
    RAISING     Raise error message in function module
    RANGES     Define internal table for selection criterion
    READ     Read tables or objects
    RECEIVE     Receive results (RFC)
    REFRESH     Delete internal table
    REFRESH CONTROL     Initialize control
    REJECT     Do not process current database line further
    REPLACE     Replace characters
    REPORT     Introduction for type 1programs
      DELETE REPORT         Delete program
      EDITOR-CALL FOR REPORT        Call ABAP program editor
      INSERT REPORT        Insert program in library
      READ REPORT        Read program
    RESERVE     List processing: Conditional new page
    RESET     Output format: Reset all formats (FORMAT)
    RIGHT-JUSTIFIED     Output format: Right justified (WRITE)
    ROLLBACK     Roll back database changes
    ROUND     Output format: Scaled (WRITE)
    RTTI     Runtime type identification
    RUN TIME ANALYZER     Activate/Deactivate runtime analysis (SET)
    SCAN     Analyze ABAP/4 source code
    SCREEN            Screen
      CALL SCREEN     Call screen
      SET SCREEN     Set next screen
      LEAVE SCREEN     Leave screen
      LEAVE TO SCREEN     Branch to a screen
      LOOP AT SCREEN     Loop through screen fields
      MODIFY SCREEN     Modify screen fields
    SCROLL     List processing: Scroll
    SCROLL-BOUNDARY          List processing: Fix lead columns (SET)
    SEARCH     Find character
    SELECT     Read database table
    SELECT-OPTIONS           Define selection criterion
    SELECTION-SCREEN     Design selection screen
      AT SELECTION-SCREENEvent:     After editing ofselection screen
    SHARED BUFFER           Cross-transaction application buffer
      DELETE FROM SHARED BUFFER         delete from application buffer
      EXPORT ... TO SHARED BUFFER       Store data in application buffer
      IMPORT ... FROM SHARED BUFFER     Read data from application buffer
    SELECTION-TABLE     Selection table (SUBMIT)
    SET     Set different processing parameters
    SHIFT     Move character
    SIGN     Mathematical function: Sign (COMPUTE)
    SIN     Mathematical function: Sine (COMPUTE)
    SINGLE     Select single record (SELECT)
    SINH     Mathematical function: Hyperbola  sine (COMPUTE)
    SKIP     List processing: Outputblank line
    SORT     Sort internal table or extract dataset
    SORTED TABLE     Table type for internaltables that are always kept
    SPLIT     Split character fields
    SQRT     Mathematical function: Square  root (COMPUTE)
    STANDARD TABLE     Table type for standardinternal tables
    START-OF-SELECTION     Event: Before first access to LDB
    STATICS     Define static data
    STOP     Stop data selection (LDB)
    STRING     Data type for variable-length character sequence
    STRLEN     Character function: Current length (COMPUTE)
    STRUCTURE         Data structure
      INCLUDE STRUCTURE     Use structure
    SUBMIT     Program call
    SUBTRACT     Subtract
    SUBTRACT-CORRESPONDING     Field string subtraction
    SUM     Calculate control total
      SELECT ... SUM     Aggregate expression: Total
    SUPPLY     Supply context key fields
    SUPPRESS DIALOG     Suppress dialog
    SYMBOL     Output as symbol (WRITE)
    SYNTAX-CHECK     Syntax check for programs and screens
    SYNTAX-TRACE     Syntax check log
    SYSTEM-CALL     Call to various system services
    SYSTEM-EXCEPTIONS        Catch runtime errors (CATCH)
    TABLE LINE               Unstructured lines in internal tables
    TABLE_LINE               Unstructured lines in internal tables
    TABLES     Declare database table
    TABLE                    Set or array operations for database tables
      DELETE ... FROM TABLE     Delete block of lines
      INSERT ... FROM TABLE     Insert block of lines
      MODIFY ... FROM TABLE     Insert/update block of lines
      UPDATE ... FROM TABLE     Update block of lines
      SELECT ... INTO TABLE     Copy block of lines to internal table
    TAN     Mathematical function: Tangent (COMPUTE)
    TANH     Mathematical function: Hyperbola tangent (COMPUTE)
    TEXT      Locale-specific
      CONVERT TEXT     Set format
      SORT itab AS TEXT     Sort an internal table
      SORT AS TEXT     Sort an extract dataset
    TEXTPOOL                 Text elements
      DELETE TEXTPOOL     Delete
      INSERT TEXTPOOL     Insert
      READ TEXTPOOL     Read
    TIME                     Time measurement
      GET RUN TIME     Get runtime
      GET TIME     Get time
      SET RUN TIME ANALYZER     Switch runtime analysison/off
    TIME STAMP               Time stamp
      GET TIME STAMP     Get time stamp
      CONVERT TIME STAMP     Convert time stamps to date/time
      WRITE f TIME ZONE     Output of time stamps to lists
    TITLEBAR     Set screen title (SET)
    TOP-OF-PAGE     Event: Top of page handling in lists
    TRANSACTION              SAP transaction
      CALL TRANSACTION     Call
      LEAVE TO TRANSACTION     Leave to
    TRANSFER     Output to file
    TRANSLATE     Character conversion incharacter fields
    TRANSPORTING       Selective field transport
      MODIFY ... TRANSPORTING     Modify lines of an internal table
      READ   ... TRANSPORTING     Read lines of an internal table
      LOOP   ... TRANSPORTING     Loop through an internal table
    TRUNC     Mathematical function: Whole  number part (COMPUTE)
    TYPE                     Define a type
      TYPES ... TYPE     Define a type
      DATA ... TYPE     Define a field
    TYPE-POOL     Introduction for type Tprograms
    TYPE-POOLS     Include type group
    TYPES     Define types
    ULINE     List processing: Underscore
    UNDER     Output format: One under the other (WRITE)
    UNIQUE           Define an
      TYPES     internal table type
    DATA                   internal table object
    UNIT     Output format: Unit (WRITE)
    UNPACK     Conversion
    UPDATE     Update database table
    USER-COMMAND     List processing: Execute command immediately (SET)
    USING                    Use parameter or format
      USING                  Parameter of a subroutine
      USING EDIT MASK     Output format: Use template (WRITE)
    VALUE-REQUEST            Self-programmed value help(F4)
      PARAMETERS ... VALUE-REQUEST          for parameters
      SELECT-OPTIONS ... VALUE-REQUEST      for selection options
    WHEN     Case distinction
      SELECT ... WHERE      when reading from databasetables
      UPDATE ... WHERE       when changing database tables
      DELETE ... WHERE      when deleting database tables
      LOOP AT ... WHERE     when looping at internal tables
      DELETE ... WHERE       when deleting from internal tables
    WHILE     Loop
    WINDOW     List processing: Outputin window
    WITH-TITLE     Output standard page header (NEW-PAGE)
    WORK                     Processing unit
      COMMIT WORK     Close unit
      ROLLBACK WORK     Close unit, but undo changes
    WRITE     List processing: Output
    WRITE TO     Correct type output in a variable
    X     Data type for fixed-length byte sequence
    XSTRING     Data type for variable-length byte sequence
    Z     Relational bit operator: Bit positions occupiedby
    Regards
    Sasidhar Reddy Matli.

  • JVM Crash on Unix (Solaris)

    Hi,
    I have an application which works fine on Windows environment. If the ear prepared on Windows is deployed on Unix it works fine. But when the application is build in Unix, the application gets deployed but when accessing the application it crashes.
    I have pasted the crash details below
    0xf9540000      /anfield/opt/bea/wls/8.1sp3/jdk142_04/jre/lib/sparc/libioser12.so
    0xdf650000      /anfield/mqseries1/opt/mqm/java/lib/libmqjbnd05.so
    0xdf610000      /opt/mqm/lib/libmqm.so
    0xdbf80000      /opt/mqm/lib/libmqz.so
    0xdbe00000      /opt/mqm/lib/libmqmcs.so
    0xdf560000      /opt/mqm/lib/libmqmzse.so
    0xdf530000      /anfield/mqseries1/opt/mqm/java/lib/libmqjbdf02.so
    0xdf510000      /anfield/mqseries1/opt/mqm/java/lib/libMQXAi02.so
    Heap at VM Abort:
    Heap
    def new generation total 32768K, used 25924K [0xe4c00000, 0xe6cf0000, 0xe8ea0000)
    eden space 31808K, 81% used [0xe4c00000, 0xe65510f0, 0xe6b10000)
    from space 960K, 0% used [0xe6b10000, 0xe6b10000, 0xe6c00000)
    to space 960K, 0% used [0xe6c00000, 0xe6c00000, 0xe6cf0000)
    tenured generation total 67296K, used 40373K [0xe8ea0000, 0xed058000, 0xf1400000)
    the space 67296K, 59% used [0xe8ea0000, 0xeb60d7c0, 0xeb60d800, 0xed058000)
    compacting perm gen total 40960K, used 40910K [0xf1400000, 0xf3c00000, 0xf9400000)
    the space 40960K, 99% used [0xf1400000, 0xf3bf3818, 0xf3bf3a00, 0xf3c00000)
    Local Time = Tue Feb 21 06:58:18 2006
    Elapsed Time = 207
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002EF 01
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Server VM (1.4.2_04-b05 mixed mode)
    # An error report file has been saved as hs_err_pid7291.log.
    # Please refer to the file for further information.
    I think I have localised the crash to a section of the code where there is character comparison done. If I comment out this section, it works fine. I ahve pasted below the section:
    else if (getChar() == '\'' && getOffset() < getBuffer().length())
    { // Start of a Literal - so just copy until the end of the literal
    do
    sb.append(getChar());
    setChar(getNextChar());
    while (getChar() != '\'' && getOffset() < getBuffer().length());
    sb.append(getChar()); // Append the final single quote
    setChar(getNextChar());
    After substituting " ' "for it integer value, I started getting a JVM crash with a different error id.; pasted it below
    [Loaded javax.servlet.http.HttpServletResponseWrapper]
    [Loaded weblogic.servlet.internal.RemoveWrapperOnForward]
    [Loaded weblogic.servlet.jsp.NestedBodyResponse]
    [Loaded weblogic.servlet.jsp.BodyOutputStream]
    [Loaded java.io.CharArrayReader from /anfield/opt/bea/wls/8.1sp3/jdk142_04/jre/lib/rt.jar]
    [Loaded weblogic.servlet.internal.CharChunkOutput]
    [Loaded sun.io.ConversionBufferFullException from /anfield/opt/bea/wls/8.1sp3/jdk142_04/jre/lib/rt.jar]
    [Loaded org.apache.struts.taglib.html.SubmitTag]
    # HotSpot Virtual Machine Error, Internal Error
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Server VM (1.4.2_04-b05 mixed mode)
    # Error ID: 4255494C442F4F502D41500E4350500107 01
    # Problematic Thread: prio=5 tid=0x000ea6f0 nid=0xa runnable
    Heap at VM Abort:
    Heap
    def new generation total 25088K, used 1933K [0xe4c00000, 0xe6530000, 0xe8ea0000)
    eden space 24384K, 5% used [0xe4c00000, 0xe4d33408, 0xe63d0000)
    from space 704K, 99% used [0xe6480000, 0xe652fff8, 0xe6530000)
    to space 704K, 0% used [0xe63d0000, 0xe63d0000, 0xe6480000)
    tenured generation total 51432K, used 43087K [0xe8ea0000, 0xec0da000, 0xf1400000)
    the space 51432K, 83% used [0xe8ea0000, 0xeb8b3e90, 0xeb8b4000, 0xec0da000)
    compacting perm gen total 40960K, used 40883K [0xf1400000, 0xf3c00000, 0xf9400000)
    the space 40960K, 99% used [0xf1400000, 0xf3becc48, 0xf3bece00, 0xf3c00000)
    Could you please help me to find out the cause? Also how do you make sense of the details(which I have pasted above) in the logs written at time of crash. Is there anyway to look at the core files other than dbx or gdb?
    Thanks,
    Ragesh

    Hi,
    I have an application which works fine on Windows environment. If the application prepared on Windows is deployed on Unix but when accessing it crashes.
    here by i am pasting the error.
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0x2a6f5075, pid=5044, tid=8201
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode)
    # Problematic frame:
    # j e4p_DecisionMaker.makeDecision(Le4p_InitailArrayContainer;I)I+2668
    --------------- T H R E A D ---------------
    Current thread (0x082a3ed8): JavaThread "Thread-0" [_thread_in_Java, id=5330]
    siginfo:si_signo=11, si_errno=-1071498229, si_code=12, si_addr=0x00000000
    Registers:
    EAX=0x04000000, EBX=0x30797160, ECX=0x00000000, EDX=0x0c800002
    ESP=0xbe5ff960, EBP=0xbe5ff988, ESI=0x30ac7d44, EDI=0xbe5ff9b8
    EIP=0x2a6f5075, CR2=0xc580a700, EFLAGS=0x00010206
    Top of Stack: (sp=0xbe5ff960)
    0xbe5ff960: 2a6e8d43 30ac8950 00000000 be5ff96c
    0xbe5ff970: 30ac7d44 be5ff9b8 30ac80f0 00000000
    0xbe5ff980: 30ac7290 be5ff9b0 be5ff9d8 2a6e8def
    0xbe5ff990: 00000000 00000000 00000000 00000000
    0xbe5ff9a0: 00000000 00000001 00000000 00000000
    0xbe5ff9b0: 00000005 2cd46c58 2c798b58 be5ff9bc
    0xbe5ff9c0: 30a772f7 be5ffa1c 30a81da8 00000000
    0xbe5ff9d0: 30a771a0 be5ffa1c be5ffa3c 2a6e8e9b
    Instructions: (pc=0x2a6f5075)
    0x2a6f5065: 75 e8 8b c2 81 e0 00 00 00 04 0f 84 05 00 00 00
    0x2a6f5075: 3b 01 ff 63 3c 8b 41 04 8b 9c 98 dc 00 00 00 8b
    Stack: [0xbe40e000,0xbe600000), sp=0xbe5ff960, free space=1990k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    j e4p_DecisionMaker.makeDecision(Le4p_InitailArrayContainer;I)I+2668
    j e4p_Schedular.scheduleCaller()V+271
    j e4p_ModuleIterator.run()V+34
    j java.util.TimerThread.mainLoop()V+221
    j java.util.TimerThread.run()V+1
    v ~StubRoutines::call_stub
    V [libjvm.so+0x1a8aa4]
    V [libjvm.so+0x25e605]
    V [libjvm.so+0x1a8cf6]
    V [libjvm.so+0x1a85c6]
    V [libjvm.so+0x1a913f]
    V [libjvm.so+0x203695]
    V [libjvm.so+0x2aaa9a]
    V [libjvm.so+0x2a5f57]
    V [libjvm.so+0x260113]
    C [libpthread.so.0+0x5b85] pthread_detach+0x515
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x082922e8 JavaThread "Thread-5" [_thread_blocked, id=5335]
    0x0825a818 JavaThread "Thread-4" [_thread_blocked, id=5334]
    0x0828e8a0 JavaThread "Thread-3" [_thread_in_native, id=5333]
    0x082553d8 JavaThread "DestroyJavaVM" [_thread_blocked, id=5044]
    0x082a3980 JavaThread "Thread-2" [_thread_blocked, id=5332]
    0x082a3800 JavaThread "Thread-1" [_thread_blocked, id=5331]
    =>0x082a3ed8 JavaThread "Thread-0" [_thread_in_Java, id=5330]
    0x080995d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5328]
    0x080987f8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5327]
    0x080954d8 JavaThread "Finalizer" daemon [_thread_blocked, id=5325]
    0x080939f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=5324]
    Other Threads:
    0x08090880 VMThread [id=5323]
    0x080b45c8 WatcherThread [id=5329]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 190K [0x2c790000, 0x2c830000, 0x2cc70000)
    eden space 512K, 24% used [0x2c790000, 0x2c7afbd8, 0x2c810000)
    from space 64K, 100% used [0x2c810000, 0x2c820000, 0x2c820000)
    to space 64K, 0% used [0x2c820000, 0x2c820000, 0x2c830000)
    tenured generation total 1408K, used 1105K [0x2cc70000, 0x2cdd0000, 0x30790000)
    the space 1408K, 78% used [0x2cc70000, 0x2cd845a0, 0x2cd84600, 0x2cdd0000)
    compacting perm gen total 4096K, used 3457K [0x30790000, 0x30b90000, 0x34790000)
    the space 4096K, 84% used [0x30790000, 0x30af0400, 0x30af0400, 0x30b90000)
    Dynamic libraries:

  • Retrieve optimize: select * from tb where mdate sysdate

    hi,
    i wrote a simple statement :
    select * from tb where mdate > sysdate;
    it takes long time to return resultset.
    when i use to_char() function,
    select * from tb where to_char(mdate,'yyyy-mm-dd') >
    to_char(sysdate,'yyyy-mm-dd');
    it runs faster.
    who can tell me why?
    thanks.

    Are you running each statement multiple times and averaging the results? If you run the date comparison once, then run the character comparison, it's likely that the data you want is already cached, so the secod statement may well return more quickly. If you average multiple runs, you can avoid this.
    Justin

  • File Merging --- Need Help

    Greetings,
    I am pretty new at this program, and I am trying to understand how to do my homework assignment. So I do not need the full code, just some help on how to get started.
    I am trying to write a program that merges all files together whose names match a certain pattern, and writes the result to an output file. The input-file pattern will consist of a combination of "normal" filename characters and question marks (?). A question mark in the input-file pattern denotes a single-character "wild card". Thus, the pattern ab?c?.txt would denote all file names that consist of 9 characters such that:
    the first two characters are ab
    the fourth character is c
    the last four characters are .txt
    For example, this would include filenames such as abxc7.txt and abqcc.txt.
    So if there are files in a folder, for example, called abc.txt, adc.txt, cat.txt, and the contents of each has two similar lines of "This is File ZZZ" Where ZZZ represents the name of the file. Then running the program with the pattern a??.txt and the output file finished.txt will result in the file finished.txt having the contents
    This is file abc.txt.
    This is file abc.txt.
    This is file abd.txt.
    This is file abd.txt.
    I don't really know where to begin here. Could you help me out? Thanks

    Check out the API docs for java.io.File. It has methods to list all the files in a particular directory.
    For the name matching, you can create a class that implements FileFilter or FileNameFilter that you then pass to these methods.
    The filter's accept method would test the file name against your criteria.
    (You wouldn't have to use the filter. You could just iterate over the files and compare each one yourself.)
    To do the actual comparison, you could use the String.matches() method or you could just do the character by character comparison yourself.
    If you google for java io tutorial you should find something that will help you with the File class, and java regex tutorial for String.match()
    Break the problem into small pieces, and get each one working before moving onto the next.
    First write a method that takes in a pattern "a?bc?.txt" and a String (that represents a filename) and returns true or false depending on whether it mathes.
    Then write a method that takes the patten and an array or List of Strings or Files and uses the first method to return an array or List of Strings or Files that represents the subset of the original list that matched.
    Post again if you have specific questions about specific parts that you don't understand or cant' get to work.

  • Download csv file with strange file name.

    hi, guys:
    We installed Oracle APEX 4.2, and APEX listener 2.0 and Oracle 11g standard edition for our application. But sometimes when user tried to download csv file from an interactive report, the file name was a very strange one, sometimes even no .csv extension. could anyone give me a hint to find documentation about it?
    Thanks.
    Sam

    lxiscas wrote:
    a little more information about it:
    I found the file name is "&P16_DIP_START_DATE NOA", which we expect to generate a file named as " some date NOA.csv", but APEX does not recognize the value of variable. For example, if teh value of P16_DIP_START_DATE is 11/15/2012, we expect the file name as "11/15/2012 NOA.csv", but APEX will give us very strange file name replaceing every "/" with / I appreciate anyone who could help me on this issue. But We did not encounter this [roblem on APEX 4.1, OC4J and Oracle 11g R2 enterprise.
    Thanks.
    I just used to_char to output date without "/" and soleved it. The other way is to set application property-->security-->browser security with basic level. This only applies to APEX 4.2. I am lucky for that I am using Apex 4.2.
    Sam
    Edited by: lxiscas on Jan 14, 2013 10:08 AM
    Edited by: lxiscas on Jan 14, 2013 10:10 AM
    Edited by: lxiscas on Jan 14, 2013 10:20 AM
    Edited by: lxiscas on Jan 14, 2013 1:36 PM
    Edited by: lxiscas on Jan 21, 2013 6:50 AM
    Edited by: lxiscas on Jan 21, 2013 6:52 AM
    I can has editing?Suspect you are trying to explain that "/"s are being rendered as <tt>&amp;#x2F</tt>? If you want to include character entities in forum posts then you have to type the ampersand ("&amp;") as an entity itself, thus: <tt>&amp;amp;#x2F</tt>.Windows or *NIX filenames can't contain "/"s anyway, so you can't use them regardless of how APEX is rendering them. Using a <tt>YYYYMMDD</tt> format is also recommended as it follows date order when using character comparison semantics.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • URGENT - ORA-01722 Causing Chaos!

    A few days ago, our test server suddenly took a dislike to numeric-to-character comparisons e.g.
    SELECT whatever
    FROM my_table
    WHERE my_char_column = 1;
    This type of code is commonplace as we have a lookup table for decoding codes which, by its nature is entirely VARCHAR2 to encompass all data types that may be stored therein.
    Somewhere on Google it suggested...
    "Oracle will automatically convert a string to a number when a number-to-character comparison is made UNLESS there is an index on the string's column."
    Indeed, an index was missing. This was restored and code like that above started to work again (as it had for years previously!).
    However, today on our live server the same ORA-01722 errors suddenly started to occur (affecting most transactions). The software (Oracle Forms) has not changed and all indexes are intact. The longstanding code is similar to that above with the additional use of a TO_NUMBER function.
    In SQL*Plus the following code logic works on our copy of the database as it was yesterday:
    SELECT whatever
    FROM my_table
    WHERE TO_NUMBER(my_char_column) = 1
    AND my_other_char_column = 'SOMETHING';
    It doesn't work against today's database. The numerous parts of the system reporting the error are unchanged as far as the actual code is concerned.
    The DBA people are confused (understandably) as they cannot recall doing anything of note to the database or the affected table.
    Any suggestions would be greatly appreciated on what could have caused this behavioural cnange in Oracle.
    Professor Yaffle

    Many thanks - an interesting read.
    Our DB is 8.1.7.4. It does all seem to point towards Oracle's optimisation - does this change its behaviour on the fly? I'll ask DBA explicitly whether CBO/RBO has been toggled (but surely they'd have mentioned that already). I know they tinkered with it a couple of years back with detrimental effect...
    There are non-numeric values in my lookup table, due to its nature, but the conditions of the SQL statements have thus far suppressed the error.
    I'd love to change all our code to live happily with the optimisation rules (i.e. compare like with like) but that will take time (months probably!) & all I'd like to acheive is to get the database behaving as it did yesterday.
    NEWSFLASH: DBA suggests "someone analysed the table". Hmmm. Methinks the problem will soon strangely go away once affected table's optimisation method is restored to that of yesterday!
    Grrr...

  • TextEdit Applescript help counter of certain words

    I have tried to modify a script that finds and replaces text. My goal is to count the instances the script finds a word, say "love", and spit out the number of instances that the word "love" appears in the document so I can use it for another subroutine. Any help is appreciated.
    I have this as guideline but it seems it does not work.
    tell application "TextEdit"
    set myCountSign to text of document 1
    set myCount to count myCountSign
    repeat with this_word in myCountSign
    if (this_word as string) is "love" then
    set myCount to myCount + 1
    end if
    end repeat
    myCount
    end tell

    The most obvious problem with your script is the line:
    repeat with this_word in myCountSign
    This looks at myCountSign (a block of text) and iterates through it assigning each text object to this_word.
    The problem is that by default each 'text object' is each character therefore you're comparing each character in the text to the string 'love' which will never, ever match. Even if the word exists you'd be performing a character-by-character comparison.
    The simplest fix is to tell AppleScript to look at the words in the text, which is done simply by:
    repeat with this_word in (words of myCountSign)
    (note you might also need to do this for 'set myCount to count myCountSign' since this will return the character count, not the word count)
    There are other, more efficient ways (such as via text item delimiters):
    tell application "TextEdit"
      set myCountSign to text of document 1
      set wordCount to (count words of myCountSign)
      set {oldtids, my text item delimiters} to {my text item delimiters, "love"}
      log set keywordCount to (count text items of myCountSign) -1
      set my text item delimiters to oldtids
      display dialog "The document has " & wordCount & " words and " & keywordCount & " occurrences of the word 'love'"
    end tell
    The text item delimiters approach works by breaking the text into chunks at each occurrence of the delimiter (in this case, the string 'love'). Then all you have to do is count the number of chunks (minus 1) which is a lot quicker than counting all the words, especially for large documents.

  • Parsing data with java is killing me

    i created some data in notepad
    which contains :: embedded in the data
    my loop gets to the :: and does not see the ::
    while
    (Strpos < (line.length() ) ) {
    index = Strpos +2;
    colons = (line.substring(Strpos, index)) ;
    System.out.println(colons);// i can see the value i'm looking at here
    if (colons != "::")
    displayline.append(line.substring(Strpos, Strpos + 1));
    Strpos++;
    the pgm always executes the displayline.append.
    is this because i created the data in notepad
    i'm really getting discouraged with java.

    Essentiallly what you're trying to do here is compare Strings. By using the == operator (or != in your case), what you are actually comparing is the address location, which is always going to return true for you, since the address are going to be different (not equal for your code example). Try changing your if statment to the following:String colonMatch = "::"
    if(!colons.equals(colonMatch)) // if you current search is not equal to a pair of colonsUsing the equals() method does a character by character comparison, which is what you are needing. I've made this mistake myself a few times, so no worries.
    James

  • CASE Condition Causing Plan Difference

    Version
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    5 rows selected.
    Optimizer
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    _optimizer_autostats_job             boolean     FALSE
    _optimizer_join_elimination_enabled  boolean     FALSE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.2
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     FALSE
    optimizer_use_invisible_indexes      boolean     FALSE
    optimizer_use_pending_statistics     boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE
    Problem
    We have a vendor system that constructs the SQL to be sent to the database. These queries have the following generic structure for a WHERE clause condition:
    CASE WHEN <condition> THEN <table>.<column> END = '<value>'We've noticed significantly different execution plans when the optimizer compares numbers instead of varchar2. The examples below demonstrate that. In our case this difference is impacting the execution plans of a larger query effectively doubling buffer gets and resulting in execution times that are 2-4 times as worse.
    Query 1
    SQL> SELECT /*+gather_plan_statistics*/ * FROM DUAL WHERE CASE WHEN 1=1 THEN 'X' END = dummy;
    D
    X
    1 row selected.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(null,null,'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  6ghjubgpwpr61, child number 0
    SELECT /*+gather_plan_statistics*/ * FROM DUAL WHERE CASE WHEN 1=1 THEN
    'X' END = dummy
    Plan hash value: 272002086
    | Id  | Operation         | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT  |      |      1 |        |      1 |00:00:00.02 |       2 |      2 |
    |*  1 |  TABLE ACCESS FULL| DUAL |      1 |      1 |      1 |00:00:00.02 |       2 |      2 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"='X')
    Query 2
    SQL> SELECT /*+gather_plan_statistics*/ * FROM DUAL WHERE CASE WHEN 'A'='A' THEN 'X' END = dummy;
    D
    X
    1 row selected.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(null,null,'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  gcpwzksqr2w9n, child number 0
    SELECT /*+gather_plan_statistics*/ * FROM DUAL WHERE CASE WHEN 'A'='A'
    THEN 'X' END = dummy
    Plan hash value: 272002086
    | Id  | Operation         | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   0 | SELECT STATEMENT  |      |      1 |        |      1 |00:00:00.01 |       2 |
    |*  1 |  TABLE ACCESS FULL| DUAL |      1 |      1 |      1 |00:00:00.01 |       2 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"=CASE  WHEN ('A'='A') THEN 'X' END )In my eyes the condition 'A' = 'A' is equivalent to the condition 1=1. How come in the case of the numeric comparison Oracle can eliminate the case expression but in the character comparison it cannot?
    Thanks!

    Centinul wrote:
    In my eyes the condition 'A' = 'A' is equivalent to the condition 1=1. Well, issue is Oracle looks at 'A' = 'A' as string comparison. And string comparison result is NLS setting dependent. That's why it can't evaluate CASE at compile time.
    SY.

  • Validate email address pre-Oracle 10g

    I want the result to be like the following, but for Oracle 9:
    SELECT  email_address   
    FROM    mytable
    WHERE   REGEXP_LIKE (email_address, '[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}');I found a website that said the following...
    In pre-Oracle10g versions of Oracle, in order to get this type of equality of characters you needed to use a combination of the NLS_UPPER and NLS_LOWER functions or use the NLS_SORT setting of GENERIC_BASELETTER. While these approaches worked they do have the flaw of having to programmatically code the NLS_UPPER or NLS_LOWER functions into every select statement. Or when using the GENERIC_BASELETTER you had a solution that was not a true linguistic solution for character comparison.
    http://www.databasejournal.com/features/oracle/article.php/3494646
    ...but I don't exactly know how to use those commands. Could anyone lend me a helping hand?

    Thank you Justin for your reply. So in the query I would call a wrapper function which I would write to go on the server that would feed the owa_pattern_match package, my string and pattern to match. In the wrapper function I would get the boolean value, and convert it to a number or varchar2 (since the database does not support boolean data types?), like 'Y' for TRUE, and that would be the return value of the wrapper function. Do I have this right?
    Why can't I just directly reference the built in package?

  • SQL Function to compare 2 strings

    Hi All
    Is there any SQL function to compare 2 strings?

    If you are looking for a character by character comparison then you would have to do something like...
    SQL> ed
    Wrote file afiedt.buf
      1  WITH T AS (select 'THIS IS MY 1ST STRING' string1, 'THIS IS MY 2ND String Bob' string2 from dual)
      2  --
      3  select s1ch, s2ch, decode(s1ch,s2ch,'Match','Mismatch') as compare
      4  from (
      5        select rn, substr(string1,rn,1) as s1ch, substr(string2,rn,1) as s2ch
      6        from t, (select rownum rn from t connect by rownum <= greatest(length(string1), length(string2)))
      7       )
      8* order by rn
    SQL> /
    S S COMPARE
    T T Match
    H H Match
    I I Match
    S S Match
        Match
    I I Match
    S S Match
        Match
    M M Match
    Y Y Match
        Match
    1 2 Mismatch
    S N Mismatch
    T D Mismatch
        Match
    S S Match
    T t Mismatch
    R r Mismatch
    I i Mismatch
    N n Mismatch
    G g Mismatch
        Mismatch
      B Mismatch
      o Mismatch
      b Mismatch
    25 rows selected.
    SQL>

  • Cavaj

    Hi,
    I have the source code which I am not sure is the latest. So I plan to take the class file, use a converter tool like cavaj and then compare the file with the source using Eclipse.
    But I want to know how will the output of cavaj be.Will it give me the exact replica of the original source(which as compiled). This is important because eclipse does a character to character comparison.
    Is there a better way of doing this??

    I have the source code which I am not sure is the
    latest. So I plan to take the class file, use a
    converter tool like cavaj and then compare the file
    with the source using Eclipse.As you've heard that's not possible, but you could try the other way:
    Compile your source and do a byte-for-byte comparison of the resulting class file. You have to be carefull to have the same compilation environment, 'though. Different compiler versions, different flags (-g, -O) and so on can result in slight changes in your class file.
    And if you are very desperate. Compile your source and then decompile both class files and do a visual diff on those two.
    But the real solution is to only roll out clearly identifyable binaries where each binary can be directly mappe to a single version of your source code (for example some Version-Information in the jar files Manifest). You'd also want to tag the coresponding version in your version control system (like CVS, you do use one, don't you?).

  • Cannot read unicode

    hi, 
    I want to perform a SELECT command and inside it i use a "unicode persian character" comparison like :[ SELECT * from products where Category = 'نام' ]
    but sql server returns no data and just displays an empty result . i tested it with some other data which are not unicode and they worked fine . but whenever unicode characters are used , no result would be displayed . could anyone help please? tnx.

    Here is the explanation for the N prefix.
    BOL: "Unicode strings             
    Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for National Language in the SQL-92 standard).
    The N prefix must be uppercase. For example, 'Michél' is a character constant while N'Michél' is a Unicode constant. Unicode constants are interpreted as Unicode data, and are not evaluated by using a code page. Unicode constants do have a collation.
    This collation primarily controls comparisons and case sensitivity. Unicode constants are assigned the default collation of the current database, unless the COLLATE clause is used to specify a collation. Unicode data is stored by using 2 bytes per character
    instead of 1 byte per character for character data. For more information, see
    Collation and Unicode Support."
    LINK: http://technet.microsoft.com/en-us/library/ms179899.aspx
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Maybe you are looking for

  • I need a step-by-step plan: my WD external hard drive is 'read only'

    Hi, I hope someone can help me, because i'm in quite a pickle. I bought a WD 500 GB external hard drive a couple of months ago. I have a MacBook Pro version OS X 10.8.5. The problem I have now is that I haven't used my external hard drive for a coupl

  • HT5621 Want to change apple ID and password on 2nd Ipad to the one on my 1st Ipad.

    I have read the directions for how to set up an IPad but there is a problem.  I have 2 Ipads, one for work, and I set them up differently with different Apple IDs and passwords. Now I find out you can't buy extras for Apps you've already bought if yo

  • Prompt Error 'this.htmlData.onDblClickMethod 'is null or is not an object

    *## We are on Solaris and upgraded from 10.3.2.1 to 10.1.3.4.1...after the upgrade we noticed that the reports with numeric filters are ## failing (ex: cal_year=2009).* *## Below is the error message:* *## A numeric value was expected (received "2009

  • Emails dumped randomly into reminders/ notes box

    The title of this posting is fairly self-explanatory: at some point relatively recently, a random assortment of emails I have sent myself from my office to my home email address over the last year (and all neatly filed into one particular inbox) have

  • Repeat executed of  synchronous bpel process

    Repeat call in synchronous bpel process The BPEL PM Server Version is as follows:      Oracle BPEL Server 版本 10.1.3.1.0 构建: 0 构建时间: Mon Oct 09 08:44:49 PDT 2006 构建类型: release 源标记: PCBPEL_10.1.3.1.0_GENERIC_061009.0802 When I run a synchronous bpel pr