Need another set of eyes...

i'm trying to build a search string and either my tick/quote marks are messing me up or i'm building the LIKE statement wrong. if a user types 'JOHN' in item :P1_LASTNAME, i'd like for all records with 'JOHN' to be returned (ex. JOHN, JOHNSON, JOHNNY).
Declare
x varchar2(2000);
Begin
x := 'select LASTNAME, FIRSTNAME from EMPLOYEES where 1=1 ';
if :P1_LASTNAME is not null then
x := x || ' AND upper(LASTNAME) like "%" ' || upper(:P1_LASTNAME) || ' "%" ';
end if;
if :P1_FIRSTNAME is not null then
x := x || ' AND upper(FIRSTNAME) like "%" ' || upper(:P1_FIRSTNAME) || ' "%" ';
end if;
x := x || 'order by LASTNAME';
return x;
End;

The code you wrote will concatenate percent signs (%) enclosed in double quotes (") to each side of the search string:
select LASTNAME, FIRSTNAME from EMPLOYEES where 1=1
AND upper(LASTNAME) like "%"JOHN"%"
You want your query to have percent signs on either side of the search string enclosed in single quotes ('):
select LASTNAME, FIRSTNAME from EMPLOYEES where 1=1
AND upper(LASTNAME) like '%JOHN%'
To escape a single quote in PL/SQL use two single quotes ('') as opposed to a double quote ("). They look VERY similar.
if :P1_LASTNAME is not null then
x := x || ' AND upper(LASTNAME) like ''%' || upper(:P1_LASTNAME) || '%'''';
end if;
...

Similar Messages

  • I need another set of eyes

    Can someone help me spot the problem? My if statement seems to take the original values not the new values?
    class MixMatchWindow extends JInternalFrame implements ActionListener
         String[] InFile = {"dog", "cat", "mat", "door"};
         String[] defFile = {"define dog", "define cat", "define mat", "define door"};
         int length = InFile.length;
         double randomNum[] = new double[length];
         double temp = 0.0;     
         int count = 0;
         public MixMatchWindow()
              super("Mix and Match",false,true,false,false);
              setBackground(Color.blue);
              setVisible(true);
              setBounds(0,0,710,570);
              getContentPane().setLayout(null);
              for(int r = 0; r < length; r++)
                   randomNum[r]= 10+(Math.random());
                   JLabel In = new JLabel("in rand loop "+randomNum[r]);
                   getContentPane().add(In);
                   In.setBounds(0,0+(r*25),210,35);
              for(int b = 0;b < length; b++)
                   /*JLabel InArray = new JLabel(InFile);
                   getContentPane().add(InArray);
                   InArray.setBounds(100,50+(b*50),100,25);*/
              for(int l = 0; l < length; l++)
                   for(int i = 0; i < length; i++)
                        if(temp > randomNum)
                             temp = temp;
                        else
                             temp = randomNum[i];
    //just for testing, these are the values I need
                   JLabel In3 = new JLabel("value of temp "+temp);
                   getContentPane().add(In3);
                   In3.setBounds(450,400+(l*25),150,35);
                   for(int w = 0; w < length; w++)
                        if(temp == randomNum[w])
    //just for testing
                   JLabel In2 = new JLabel("count loop "+count);
                   getContentPane().add(In2);
                   In2.setBounds(0,150+(w*25),110,35);
    //just for testing,revert to old values
                   JLabel In4 = new JLabel("temp loop "+temp);
                   getContentPane().add(In4);
                   In4.setBounds(100,150+(w*25),110,35);
                             /*JLabel RandArray = new JLabel(defFile[count]);
                             getContentPane().add(RandArray);
                             RandArray.setBounds(300,50+(w*50),100,25);*/
    //just for testing
                   JLabel In = new JLabel("b def loop "+randomNum[w]);
                   getContentPane().add(In);
                   In.setBounds(0,300+(w*25),110,35);
                             randomNum[count] = 0;
                             count = 0;
                             temp = 0;
                             break;                         
                        count= count+1;
              repaint();
         public void actionPerformed(ActionEvent e)

    You have two if statements, and it's far from clear what you mean. Be more explicit, and use code tags:
    [code]
    Program here

  • Opening .txt file - Need another set of eyes

    Hi folks - The attached file opens in Notepad and MS Excel as 9999 rows x 3 columns (X,Y,Z values, respectively).  I have tried different delimiters using 'Read From Spreadsheet File.vi' to bring in all the data but only successful bringing in the first column of 9999 values.  Can someone take a look at this and give me the trickto get it open using LabVIEW?  I expect it is something very simple but it is a Monday, isn't it?
    Thanks in advance.
    Don
    Solved!
    Go to Solution.
    Attachments:
    XYZ.txt ‏292 KB

    If you've ever been burned by this before, please kudo altenbach's Idea Exchange submission...
    Indicate the display format of Strings
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • I need another pair of eyes.... my loops have got me twisted!

    Hey I'm trying to put together a basic tic tac toe game without using any classes. I've written enough code to allow one person to choose a valid position and for next to do so as well. So the game begins and the first player is asked to choose a position on the board,... you select a valid space between 1 and 9, otherwise you have to choose again, after you enter a valid number between 1 and 9 and second bit of code takes the integer value you've entered and converts it into a string for us to compare against the position. Since the 3X3 array is initialized to the numbers 1-9 corresponding with the positions the user selects, if anything other than the number entered appears in the position, the spot has previously been filled and the user is supposed to be prompted to select another position. So... getting back to the problem, after the user selects a bad position the code jumps back up to the top instead of executing the specific error code i tried to have triggered. Along the way you'll notice I've that I've commented out entire blocks of code with some ideas that I've had the have pretty much brought me back to the same place. I feel I've been looking at this thing for too long and i need some fresh perspective. I'm sure I'll be kicking myself when one you nobles points out my flaw.
    By the way player 2 code differs from player one so choose a base and let me know which approach works best.
    thanks for the consideration
    import java.util.Scanner; // importing the scanner to be able to accept user input
    public class ticTacToe { // matches the name of the file "ticTacToe.java"
         public static void main(String[] args) { //declaring the main class
    // *** Beginning: declaring all variables and objects ***
              Scanner keyboard = new Scanner (System.in); //creating the scanner object to accept user input
              char [][] board = new char [3][3];
              int row, column, i ,j;
              int userInput;
              char userInputChar;
              boolean emptySpotTest = false;
              //boolean userInputTest;
    // *** End: declaring all variables and objects ***
    // *** Beggining of Header ***
              System.out.println("X O X - Welcome to Benjamin's Tic Tac Toe Game - O X O\n");
              System.out.println("This Game has been designed to be played by two players.");
              System.out.println("As usual, one person will be player X and the other O.");
              System.out.println("When you choose where you'd like to place your piece enter a number between 1 and 9.\n");
              System.out.println(" 1 | 2 | 3 ");
              System.out.println("---|---|--- ");
              System.out.println(" 4 | 5 | 6 ");
              System.out.println("---|---|--- ");
              System.out.println(" 7 | 8 | 9");
    //*** End of Header ***
              //Initialize all of the elements in the array
              for(i = 0; i < 3; i++){
              board [0] = Integer.toString(i + 1).charAt(0);
                   for(i = 0; i < 3; i++){
                   board [1][i] = Integer.toString(i + 4).charAt(0);
                        for(i = 0; i < 3; i++){
                        board [2][i] = Integer.toString(i + 7).charAt(0);
                   for (i = 0; i < 3; i++){
                             System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
                             if (i != 2) System.out.print("\n---|---|---\n");
    int moveCounter = 0; //used to count the number of moves to trigger a test for a winner
    while (moveCounter >= 0){ //starting a game
         while (moveCounter % 2 == 0){ //finding out if player 1 should go
              emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
                   do{ //get an integer between 1 and 9 from the user
                        System.out.print("\nPlayer X please choose your spot on the board: ");
                        userInput = keyboard.nextInt();
                   } while (userInput < 1 || userInput > 9);
                   // figure out what position the player has selected
                   row = (userInput - 1) / 3;
                   column = (userInput - 1) % 3;
                   userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                   // finished converting the position to a string
              do{     
              if (board [row][column] == userInputChar){
              board [row][column] = 'X';
              moveCounter++;
                   else{
              while (emptySpotTest = false) {
                   System.out.print("Error: Player X, please enter a position that has not been taken: ");
                   userInput = keyboard.nextInt();
    //               figure out what position the player has selected
                   row = (userInput - 1) / 3;
                   column = (userInput - 1) % 3;
                   userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                   // finished converting the position to a string
                   if (board [row][column] == userInputChar){
                        board [row][column] = 'X';
                        emptySpotTest = true;
                        moveCounter++;
                   }else emptySpotTest = false;
              } while (emptySpotTest = false);
                        do{
                                            System.out.print("Error: Player X, please enter a position that has not been taken: ");
                                            userInput = keyboard.nextInt();
                                       } while (userInput < 1 || userInput > 9);
                                            //figure out what position the player has selected
                                            row = (userInput - 1) / 3;
                                            column = (userInput - 1) % 3;
                                            userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                                            // finished converting the position to a string
                                            if (board [row][column] == userInputChar){
                                                 board [row][column] = 'X';
                                                 emptySpotTest = true;
                                                 moveCounter++;
                                            }else emptySpotTest = false;
                        } //end of else statement
              //} while (emptySpotTest = false); //end of while for 2nd test
         }//end of while statement for palyer 1
    while (moveCounter % 2 != 0){ //finding out if player 2 should go
              emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
                   do{ //get an integer between 1 and 9 from the user
                        System.out.print("\nPlayer O please choose your spot on the board: ");
                        userInput = keyboard.nextInt();
                   } while (userInput < 1 || userInput > 9);
                   // figure out what position the player has selected
                   row = (userInput - 1) / 3;
                   column = (userInput - 1) % 3;
                   userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                   // finished converting the position to a string
              do{     
              if (board [row][column] == userInputChar){
              board [row][column] = 'O';
              moveCounter++;
                   else{
                        emptySpotTest = false;
              } while (emptySpotTest = false);
                             do{
                                  if (emptySpotTest = false){
                                       do{
                                            System.out.print("Error: Player O, please enter a position that has not been taken: ");
                                            userInput = keyboard.nextInt();
                                       } while (userInput < 1 || userInput > 9);
                                            //figure out what position the player has selected
                                            row = (userInput - 1) / 3;
                                            column = (userInput - 1) % 3;
                                            userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                                            // finished converting the position to a string
                                            if (board [row][column] == userInputChar){
                                                 board [row][column] = 'O';
                                                 emptySpotTest = true;
                                                 moveCounter++;
                                            }else emptySpotTest = false;
                             }while (emptySpotTest = false);
              } //end of while statement for palyer 2
    }//end of gamecounter while
    }//end of public static void main
    }//end of public class ticTacToe
              //begin player 2 code
              while (moveCounter % 2 != 0){ //finding out if player 2 should go
                   emptySpotTest = false; //initialize the test to negative to be sure to run the tests every time we go in the above while loop
                        do{ //get an integer between 1 and 9 from the user
                             System.out.print("\nPlayer O please choose your spot on the board: ");
                             userInput = keyboard.nextInt();
                        } while (userInput < 1 || userInput > 9);
                        // figure out what position the player has selected
                        row = (userInput - 1) / 3;
                        column = (userInput - 1) % 3;
                        userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                        // finished converting the position to a string
                   if (board [row][column] == userInputChar){
                   board [row][column] = 'O';
                   emptySpotTest = true;
                   moveCounter++;
                   else {
                             do{
                                  do{
                                  System.out.print("Error: Player O, please enter a position that has not been taken: ");
                                  userInput = keyboard.nextInt();
                                  } while (userInput < 1 || userInput > 9);
                                  //figure out what position the player has selected
                                  row = (userInput - 1) / 3;
                                  column = (userInput - 1) % 3;
                                  userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                                  // finished converting the position to a string
                                  if (board [row][column] == userInputChar){
                                       board [row][column] = 'O';
                                       emptySpotTest = true;
                                       moveCounter++;
                                  }else emptySpotTest = false;
                             }while (emptySpotTest = false);
                   } //end of else statement
              }//end of gamecounter while
         }//end of public static void main
    }//end of public class ticTacToe
              if (board[row][column] == userInputChar){ //test condition for the while statement directly below
                   board [row][column] = 'X'; //mark the spot with an X if it's empty
                   emptySpotTest = true; //set the boolean to to true meaning the spot is empty
                   moveCounter++; //test code
                   System.out.print(emptySpotTest); //test code
                   System.out.println(" " + board[row][column]); //test code
              else {
                   emptySpotTest = false;
              System.out.print(emptySpotTest); //test code
              System.out.println(" " + board[row][column]); //test code
              while (emptySpotTest = false){
                   do{
                        System.out.print("Error: Player X, please enter a position that has not been taken: ");
                        userInput = keyboard.nextInt();
                   } while (userInput < 1 || userInput > 9);
                   if (board[row][column] == userInputChar){
                        board [row][column] = 'X'; //mark the spot with an X if it's empty
                        System.out.print(emptySpotTest); //test code
                        System.out.println(" " + board[row][column]); //test code
                        emptySpotTest = true; //set the boolean to to true meaning the spot is empty
                        moveCounter++; //test code
                        System.out.print(emptySpotTest); //test code
              } //this segment of code is run after the user initially enters the number than it checks to see if
              //the space is free if not it keep looing until it's satisfied
              for (i = 0; i < 3; i++){
                   System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
                   if (i != 2) System.out.print("\n---|---|---\n");
              //moveCounter++; //increment the move counter
              while (moveCounter % 2 != 0){ //finding out if player 2 should go
                   emptySpotTest = false;
                   do{ //get an integer between 1 and 9 from the user
                   System.out.print("\nPlayer O please choose your spot on the board: ");
                   userInput = keyboard.nextInt();
                   } while (userInput < 1 || userInput > 9);
                   // figure out what position the player has selected
                   row = (userInput - 1) / 3;
                   column = (userInput - 1) % 3;
                   userInputChar = Integer.toString(userInput).charAt(0); //convert the users input positions into a char to match the array type
                   if (board[row][column] == userInputChar){ //test condition for the while statement directly below
                        board [row][column] = 'O'; //mark the spot with an X if it's empty
                        emptySpotTest = true; //set the boolean to to true meaning the spot is empty
                        System.out.print(emptySpotTest); //test code
                        System.out.println(" " + board[row][column]); //test code
                   else {
                        emptySpotTest = false;
                   while (emptySpotTest = false){
                        do{
                             System.out.print("Error: Player O, please enter a position that has not been taken: ");
                             userInput = keyboard.nextInt();
                        } while (userInput < 1 || userInput > 9);
                        if (board[row][column] == userInputChar){
                             board [row][column] = 'O'; //mark the spot with an X if it's empty
                             System.out.print(emptySpotTest); //test code
                             System.out.println(" " + board[row][column]); //test code
                             emptySpotTest = true; //set the boolean to to true meaning the spot is empty
                             System.out.print(emptySpotTest); //test code
                   } //this segment of code is run after the user initially enters the number than it checks to see if
                   //the space is free if not it keep looing until it's satisfied
                   System.out.println(board[row][column]);
                   System.out.println(emptySpotTest); //test code
                   System.out.print("\n");
                   for (i = 0; i < 3; i++){
                        System.out.printf( " %c | %c | %c", board[i][0], board[i][1], board[i][2]);
                        if (i != 2) System.out.print("\n---|---|---\n");
                   System.out.print("\n");
                   moveCounter++; //increment the move counter
              System.out.print("\n" + moveCounter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    I suggest you try using a debugger to step through the program to see what it is doing.
    This will help you understand what you program does.
    I also suggest you try formatting your code in a readable manner or using a code formatter to do this for you.

  • Maintenance Windows - I need another pair of eyes

    Hello Everyone,
    I am looking for a second pair of eyes to ensure I have this process down 100%. The goal is a scheduled client computer reboot following the May patch install.
    Assign a 12 hour maintenance window on my client computer collection.
    Enforce a 10 hour reboot cycle (initial notification).
    Enforce a non-dismissible notification at the 3 hour mark.
    I am running some final tests today. Below is my maintenance window:
    This is the reboot behavior I assigned:
    My first test this morning resulted in the computer say it was going to reboot in 90 minutes! I double checked the computer only had the single maintenance window applied and the client settings were assigned and set properly. I'm concerned there may be
    some hidden maximum value on the restart settings.

    Ensure that you don't have any applications/updates that are set to install and reboot outside of maintenance windows.
    If my answer helped you, check out my blog:
    DeployHappiness. Subscribe by
    RSS or
    email. 

  • Need another pair of eyes to help on this form..........

    Hello Everyone,
    I have a form that needs a little love.....I have it setup to take values from drop downs and match the values from numeric fields with the dropdowns and multiply the information depending on what is selected.  The problem I am running into is it isn't always working.  If I select one of the first two options in packDes1 then it works exactly like it should though if i select any other monthly option it doesn't multiply correctly.
    The form is found at the following URL for Download:
    http://www.shingleme.com/NewCostForm_6_15_2010.pdf
      Any help is appreciated

    Paul,
    Thank you again for coming through!!!!!!  Once I fixed the typo and put the "if" code block on one line it worked. I have a strange question then though.  can you do something like
    var j = 'justin';
    textfield.rawValue = j.rawValue (Where j is the value justin and justin is the name of a textfield)
    The reason I ask is I went and used find/replace for the other rows in the form to separate all of them but wanted to use inplace substitution though wasn't sure how to do it.
    Justin

  • Another set of eyes

    I could use a second look. Why is name outputting null rather than "no name yet?"
    import java.util.Scanner;
    public class Exercise5
        public static void main(String[] args)
           //Create the contructors
            Species species1 = new Species();
            Species species2 = new Species();
            Species species3 = new Species();
            //Output the initial values of the three constructors
            System.out.println("==================== Initial Values ====================");
            System.out.println("\nSpecies 1");
            species1.writeOutput( );
            System.out.println("\nSpecies 2");
            species2.writeOutput( );
            System.out.println("\nSpecies 3");
            species3.writeOutput( );
    import java.util.Scanner;
    Class for data on endangered species.
    public class Species
        private String name;
        private int population;
        private double growthRate;
        public void readInput( )
            Scanner keyboard = new Scanner(System.in);
            System.out.println("What is the species' name?");
            name = keyboard.nextLine( );
            System.out.println(
                          "What is the population of the species?");
            population = keyboard.nextInt( );
            while (population < 0)
                System.out.println("Population cannot be negative.");
                System.out.println("Reenter population:");
                population = keyboard.nextInt( );
            System.out.println("Enter growth rate (% increase per year):");
           growthRate = keyboard.nextDouble( );
        public void writeOutput( )
             System.out.println("Name: = " + name);
             System.out.println("Population: = " + population);
             System.out.println("Growth rate: = " + growthRate + "%");
         Precondition: years is a nonnegative number.
         Returns the projected population of the calling object
         after the specified number of years.
        public int predictPopulation(int years)
              int result = 0;
            double populationAmount = population;
            int count = years;
            while ((count > 0) && (populationAmount > 0))
                populationAmount = (populationAmount +
                              (growthRate / 100) * populationAmount);
                count--;
            if (populationAmount > 0)
                result = (int)populationAmount;
            return result;
        public void setSpecies(String newName, int newPopulation,
                               double newGrowthRate)
            name = newName;
            if (newPopulation >= 0)
                population = newPopulation;
            else
                System.out.println("ERROR: using a negative population.");
                System.exit(0);
            growthRate = newGrowthRate;
        public String getName( )
            return name;
        public int getPopulation( )
            return population;
        public double getGrowthRate( )
            return growthRate;
        public boolean equals(Species otherObject)
            return (name.equalsIgnoreCase(otherObject.name)) &&
                   (population == otherObject.population) &&
                   (growthRate == otherObject.growthRate);
        //set the default species constructor
        public void Species ()
              String name = "No name yet";
              int population = 0;
              double growthRate = 0.0;
         //set a constructor using just the initialName
         public void Species(String initialName)
              String name = initialName;
              int population = 0;
              double growthRate = 0.0;
         //set a constructor using initialName and initialPopulation
         public void Species(String initialName, int initialPopulation, double initialGrowthRate)
              String name = initialName;
              int population = initialPopulation;
              double growthRate = initialGrowthRate;
    }

    warnerja wrote:
    public void Species ()And don't forget the other hint: The above is NOT defining a constructor. It is defining a method named "Species", which you never invoke, so even if you just change the code as suggested so far, you'll still have a null.<GRUMBLE>
    ... and in my humble opinion both these "common problems" should result in compiler warning.
    public void Species ()
                        ^
    STYLE_WARNING: The 'public void Species()' method has the same name as the containing class, making it look like a
    constructor. This method name is confusing to other programmers, and is a likely cause of future bugs. This is
    most commonly a mistake. If you meant 'Species()' to be a constructor then remove the return type. If you
    meant this to be a method then you should rename it.
        String name = "No name yet";
        ^
    STYLE_WARNING: The local variable 'name' hides the class attribute of the same name (this.name). This is confusing,
    especially to other programmers, and is a common cause of bugs. Consider renaming the local variable, or
    the attribute.</GRUMBLE>

  • Stacking quotes - need another pair of eyes

    Oracle 11.2.0.1 SE-One, 64-bit
    Oracle Linux 5.6 x86-64
    Given the following procedure, and focusing on the call to dbms_scheduler
    create or replace
    PROCEDURE dw.fix_job_timezone(
        p_jobschema_in IN VARCHAR2 default null)
    IS
    type sched_jobs_tbl_type
    IS
      TABLE OF dba_scheduler_jobs.job_name%TYPE INDEX BY binary_integer;
      t_sched_jobs sched_jobs_tbl_type;
      v_job          VARCHAR2(128);
    BEGIN
      SELECT
        job_name
      bulk collect INTO
        t_sched_jobs
      FROM
        dba_scheduler_jobs
      WHERE
        owner = p_jobschema_in
      ORDER BY
        job_name ;
      FOR i IN t_sched_jobs.first .. t_sched_jobs.last
      LOOP
        v_job := '"' || p_jobschema_in || '"."'||t_sched_jobs(i) || '"';
        dbms_output.put_line('Processing '||v_job);
        dbms_scheduler.set_attribute_null (v_job, 'START_DATE'); 
      END LOOP;
    END;If the owner of the above procedure connects and calls dbms_scheduler directly:
    SQL> show user
    USER is "DW"
    SQL> exec DBMS_SCHEDULER.set_attribute_null ('"ESTEVENS"."EDS_SQLNAV_JOB1"', 'ST
    ART_DATE');
    PL/SQL procedure successfully completed.Yet, when calling the above procedure:
    SQL> exec dw.fix_job_timezone('ESTEVENS');
    Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
    BEGIN dw.fix_job_timezone('ESTEVENS'); END;
    ERROR at line 1:
    ORA-27486: insufficient privileges
    ORA-06512: at "SYS.DBMS_ISCHED", line 4398
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
    ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
    ORA-06512: at line 1
    SQL>Maybe a problem with the enclosing quotes, or lack of?
    Change the key line to
    dbms_scheduler.set_attribute_null ('v_job', 'START_DATE');  And we get
    SQL> exec dw.fix_job_timezone('ESTEVENS');
    Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
    BEGIN dw.fix_job_timezone('ESTEVENS'); END;
    ERROR at line 1:
    ORA-27476: "DW.V_JOB" does not exist
    ORA-06512: at "SYS.DBMS_ISCHED", line 4398
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
    ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
    ORA-06512: at line 1Or
    dbms_scheduler.set_attribute_null ('''||v_job||''', 'START_DATE');  And get
    SQL> exec dw.fix_job_timezone('ESTEVENS');
    Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
    BEGIN dw.fix_job_timezone('ESTEVENS'); END;
    ERROR at line 1:
    ORA-27452: '||v_job||' is an invalid name for a database object.
    ORA-06512: at "SYS.DBMS_ISCHED", line 4398
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
    ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
    ORA-06512: at line 1
    dbms_scheduler.set_attribute_null ('v_job', 'START_DATE'); 
    And getERROR at line 1:
    ORA-27476: "DW.V_JOB" does not exist
    ORA-06512: at "SYS.DBMS_ISCHED", line 4398
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
    ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
    ORA-06512: at line 1
    I’ve been chasing my tail to get the right combination of single-quotes and possibly concatenation, but it has eluded me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    EdStevens wrote:
    ... If the owner of the above procedure connects and calls dbms_scheduler directly:
    SQL> show user
    USER is "DW"
    SQL> exec DBMS_SCHEDULER.set_attribute_null ('"ESTEVENS"."EDS_SQLNAV_JOB1"', 'ST
    ART_DATE');
    PL/SQL procedure successfully completed.Yet, when calling the above procedure:
    SQL> exec dw.fix_job_timezone('ESTEVENS');
    Processing "ESTEVENS"."EDS_SQLNAV_JOB1"
    BEGIN dw.fix_job_timezone('ESTEVENS'); END;
    ERROR at line 1:
    ORA-27486: insufficient privileges
    ORA-06512: at "SYS.DBMS_ISCHED", line 4398
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2892
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 3028
    ORA-06512: at "DW.FIX_JOB_TIMEZONE", line 78
    ORA-06512: at line 1
    Remember that privileges granted through roles don't count in AUTHID DEFINER stored procedures.
    Your procedure doesn't specify AUTHID, so it defaults to DEFINER; therefore, the privilges to do anything in the procedure must be granted directly to the procedure owner (or to PUBLIC), and not merely to some role that the procedure owner has.
    Maybe a problem with the enclosing quotes, or lack of?I don't think so. If the quotes were wrong, I would expect a compile-time error, not a run-time error. Also, regardless of when you got the error, I would expect the error message for misplaced quotes to be something about syntax, like "keyword not found where expected', rather than something about privileges.
    You're already doing the smart thing:
    {code}
    dbms_output.put_line('Processing '||v_job);
    dbms_scheduler.set_attribute_null (v_job, 'START_DATE');
    END LOOP;
    {code}displaying v_job pefore running it. If you can run that same command in an EXEC command (as the procedure owner), then it's definitely an AUTHID DEFINER problem, and you need the privileges granted directly to you.

  • I am having problems to run an app, there is an error display that says I need to set bonjour and that this app serial number has been used by another red user,  could anybody guide me?

    I am having problems to run an app, there is an error display that says I need to set  bonjour services

    Logic is the APPlication (program, app) that you are having the problem with.
    Logic Pro can take advantage of other computers on your local (home or work) network to help it do "heavy lifting" data chores by using Bonjour and a feature called Nodes.   It seems that Logic is attempting to find and connect to another machine on your network.
    Do you have Logic installed on another computer there?  That may be the source of the confilict.
    You might want to post this question in the Logic Pro Community.
    Be sure to indicate the version of Logic Pro that you are using.  I'm sure the folks there can help you out.

  • I am having problems to run logic pro 9, there is an error display that says I need to set bonjour and that this app serial number has been used by another red user,  could anybody guide me?

    I am having problems to run logic pro 9, there is an error display that says I need to set bonjour and that this app serial number has been used by another red user,  could anybody guide me? actually, my computer can't start  since three days ago, could it be the same problem?

    Logic is the APPlication (program, app) that you are having the problem with.
    Logic Pro can take advantage of other computers on your local (home or work) network to help it do "heavy lifting" data chores by using Bonjour and a feature called Nodes.   It seems that Logic is attempting to find and connect to another machine on your network.
    Do you have Logic installed on another computer there?  That may be the source of the confilict.
    You might want to post this question in the Logic Pro Community.
    Be sure to indicate the version of Logic Pro that you are using.  I'm sure the folks there can help you out.

  • I have 4 computers running Adobe CC under two different accounts (as 1 account can only be installed on two computers) i need it on a 5th computer now, do i need another account or can i set up something so all 5 run from the same account making it easier

    I have 4 computers running Adobe CC under two different accounts (as 1 account can only be installed on two computers) i need it on a 5th computer now, do i need another account or can i set up something so all 5 run from the same account making it easier?

    Check into a Team account
    -http://www.adobe.com/products/creativecloud/teams/benefits.html
    -assign a new team member http://forums.adobe.com/thread/1460939?tstart=0 may help
    -Team Installer http://forums.adobe.com/thread/1363686?tstart=0

  • Please All. Am so scared to say I someone stole my Ipad and till now I haven't set my eyes on that ipad. I know quite sure that as I updated to iOS 7.0.2, I turned on my find my ipad feature. Now I can't even sign in to iCloud from another device.

    Please All. Am so scared to say I someone stole my Ipad and till now I haven't set my eyes on that ipad. I know quite sure that as I updated to iOS 7.0.2, I turned on my find my ipad feature. Now I can't even sign in to iCloud from another device. How best can someone help me to locate this device. Thanks. Chukks78

    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
     Cheers, Tom

  • Is there any database parameters we need to set when using DBMS_PARALLE_EXECUTE?

    Hi,
    I am using dbms_parallel_execute package to do some process, I call a procedure to do the some tasks and insert data using the chunks by sql. Here is my code, I am calling p_process procedure, I am using 11g 11.2.0.3.0 - 64 bit  on windows server.
    DBMS_PARALLEL_EXECUTE.CREATE_TASK ('process a');
      DBMS_PARALLEL_EXECUTE.CREATE_CHUNKS_BY_SQL (
          task_name => 'process a',
         sql_stmt => 'SELECT startid, endid FROM chng_chunks',
         by_rowid => FALSE);
            dbms_parallel_execute.run_task
            ( task_name      => 'process a',
              sql_stmt       => 'begin P_process( :start_id, :end_id ); end;',
              language_flag  => DBMS_SQL.NATIVE,
             parallel_level => 24 );
    This code runs very fast on a one database and I can see it uses lots of cpus but it runs very slow on a copy of the same database on another server which has more cpus and memory. I compare v$parameter vlues and those are pretty much  identical between databases. I checked the disk spaces and both servers has plenty of free space on disks.
    Now my question is, is there any other parameters that we need to set/check when using dbms_parallel_execute package.
    Thanks in advance.
    gg

    I don't get this. Ever. Why developers insist on comparing server1 with server2, simply because their code is running on both.
    It is like comparing the athletic ability of two persons, arguing that h/w wise they are the same (i.e. human), and both have green eyes (your same software). And as because these are all the same, both persons should be able to run the 100m in the same time.
    Yes, the analogy is silly.. as is the warped concept amongst many developers that server1 and server2 should exhibit the same performance when running the same code.
    It. Does. Not. Work. Like. That.
    Want to know why server2 is exhibiting the performance it does when running your code?
    Do that by ignoring server1 as it is NOT RELEVANT.
    Do that by examining the workloads and resource usage of server2, and the run and wait states of your code on server2.

  • Help needed in setting up Japanese Database

    Hi there,
    Help needed in setting up Japanese Database.
    I created database with UTF8 character set on Sun Solaris O/S.
    Oracle version 8.1.7.
    I am accessing the DB through SQL*Plus (Windows client).
    I downloaded the Japanese font on client side and also set the NLS_LANG environment variable to Japanese_Japan.UTF8. Still, I am not able to view Japanese characters. O/S on client side is Windows 2000 professional (English). Is O/S (client) need to be Japanese O/S? When I try to retrieve sysdate, its displaying in Japanese but not all characters in Japanese. Can anyone help me out how to set up the client and is there any parameters to be setup at server side? I also tried to insert japanese characters into table through client, but it displaying as "?????" characters. Any help in this regard is appreciated.
    Thanks in advance,
    -Shankar

    lol
    your program is working just fine.
    do you know what accept does? if not read below.
    serversocket.accept() is where java stops and waits for a (client)socket to connect to it.
    only after a socket has connected wil the program continue.
    try putting the accept() in its own little thread and let it wait there while your program continues in another thread

  • Have problem setting Email alerts for Calendar events. Warning message says I need to set up a card in Contacts with my email. I do but it doesn't recognize it. How do I indicate the email I want alerts sent to?

    The system of setting up email alerts for Calendar events worked fine in Snow Leopard but since I upgraded to Mt. Lion Calendar won't let me set email alerts. When I try, I get an error message saying I need to set up a card in Contacts for my email. I have a card set up in Contacts for both of my email addresses but it doesn't recognize them. Perhaps the name I have on the card doesn't match a name that Calendar is looking for. Calendar doesn't seem to have a way in Preferences or elsewhere to indicate the email I want alerts sent to. Any ideas how I can get this system working again? Thanks for your help.

    You might want to consider starting a new discussion. Since this one is marked solved, less people are likely to look at it. You can link to this one.
    See if another contact is marked as this is my card.

Maybe you are looking for

  • Nano no longer likes my PC anymore

    Hi, this problem is really frustrating me. When I first installed the nano, I was able to use iTunes and transfer all my music. Everything was good. Then the next day, I wanted to put more music on my nano. So I popped the USB plug into it and the na

  • L655 Windows failed to start up

    Have the satellite L655 Laptop and i get this.  Windows failed to start up. A recent hardware or software change might be the cause. To fix the problem:  1. Insert your windows installation disc and restart your computer. 2.choose your language setti

  • Did bug fix for add-ons after downloading new version. FB games do not work & add-ons still gone. I want the old version back. How can I do this?

    Downloaded version 7 today. All add-ons are gone, not disabled, but gone. The bug fix offered in this instance tells me to go look for updates. I have, and I'm totally up to date, so now I don't know what to do. The add-ons are still gone, and my gam

  • CMR pricing issue

    During Credit Memo request creation - with reference to F2 customer invoice - - VA01 transaction should be pricing copied from original invoice into CM request without changes. This is set up in copy control customizing (spro - TVAF transaction). But

  • I can't find startrfc.exe in SAPGUI 640

    I use the program startrfc.exe to execute a function of sap to print invoices, but with the new version of sapgui 640 this file doesn't appear. Where can I find this file, or how can I execute this function out of sap? Thanks in advance. Best regards