How to Search  '&'  char

Hi,
i tried to find all customers with &CO in the customer name.
Result--> No data found
my code is
AND nvl(upper("CUSTOMER_NAME"),'%') like '%'||upper(:P1001_CUST_NAME)||'%'
Any help
Thanks in advance
Costantino

Costantino
take a look at
Re: wild card searching in sql squery (pl/sql function body returning......
hope this helps.
Leo

Similar Messages

  • How to search char in a string

    hi, i am new to JSP.
    i have a string, for example an address "Frauenstrasse 10", i want to split it into street name "Frauenstrasse" and house number "10". but i don't know the syntax to process String. can anyone help? thanks!

    new StringTokenizer(myString," "); // Tokens just space
    or
    new StringTokenizer(myString); // Tokens white space
    token.hasMoreTokens(); - boolean
    token.nextToken(); - Returns String
    Stick in While loop.

  • How to search in BI 7.1 query designer for the required key figures & chars

    Hi All,
         Can anyone plz tell me how to search in BI 7.1 query designer for the required key figures & characteristics. I have the query being built on a multiprovider which has many cubes.
    So, i have a huge list of key figures and characteristics. I am not able to search for the required one by the name or the technical name.
    How can we search and pick the required object from the enormous list of the Mutliprovider in the Bex Query Designer??
    Thanks
    Phani

    There is not a search feature available. You have to do an educated guess under what dimension your infoobject could be and select.

  • How to search a word in a 2d array

    Hi, i'm seeking advice on how to search a word in 2d array. The method will only taking one argument string and will search in row by row, column by column and diagonall down and up. for example, user input String "SEEK" or then the method will have different search pattern to locate the word. Here is the 2d array look like.
    S + K E E S + +
    E + + + + + + K
    E S + + + + + E
    K + E + + + + E
    + + + E + + + S
    + + + + K + + +
    What i've done so far is;
    // this loop is for search SEEK column by column
    public boolean finder(String w){
    for(int j = 0; j < puzzle[0].length; j++) {
    for(int a = 0; a < w.length(); a++) {
    char n = w.charAt(a);
    String r = String.valueOf(n);
    if (puzzle[0][j] != w.charAt(a)) {
    return false
    } else {
    return true;

    read this

  • How to search for files using wildcards * and ?.

    Hi All,
    I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
    Thanks

    Hi All,
    First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
    I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
    I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
    Enjoy
    * File Name: WildcardSearch.java
    * Date: Jan 9, 2004
    * This class will search all files in a directory using the
    * asterisk (*) and/or question mark (?) as wildcards which may be
    * used together in the same file name.  A File [] is returned containing
    * an array of all files found that match the wildcard specifications.
    * Command line example:
    * c:\>java WildcardSearch c:\windows s??t*.ini
    * New sWild: s.{1}.{1}t.*.ini
    * system.ini
    * Command line break down: Java Program = java WildcardSearch
    *                          Search Directory (arg[0]) = C:\Windows
    *                          Files To Search (arg[1]) = s??t*.ini
    * Note:  Some commands will not work from the command line for arg[1]
    *        such as *.*, however, this will work if you if it is passed
    *        within Java (hard coded)
    * @author kmportner
    import java.io.File;
    import java.io.FilenameFilter;
    public class WildcardSearch
         private static String sWild = "";
          * @param args - arg[0] = directory to search, arg[1] = wildcard name
         public static void main(String[] args)
              String sExtDir = args[0]; // directory to search
              sWild = args[1];   // wild card to use - example: s??t*.ini
              sWild = replaceWildcards(sWild);
              System.out.println("New sWild: " + sWild);
              File fileDir = new File(sExtDir);
              File[] arrFile = fileDir.listFiles(new FilenameFilter()
                   public boolean accept(File dir, String name)
                        return (name.toLowerCase().matches(sWild));
              for (int i = 0; i < arrFile.length; ++i)
                   System.out.println(arrFile.getName());
         }     // end main
         * Checks for * and ? in the wildcard variable and replaces them correct
         * pattern characters.
         * @param wild - Wildcard name containing * and ?
         * @return - String containing modified wildcard name
         private static String replaceWildcards(String wild)
              StringBuffer buffer = new StringBuffer();
              char [] chars = wild.toCharArray();
              for (int i = 0; i < chars.length; ++i)
                   if (chars[i] == '*')
                        buffer.append(".*");
                   else if (chars[i] == '?')
                        buffer.append(".{1}");
                   else
                        buffer.append(chars[i]);
              return buffer.toString();
         }     // end replaceWildcards method
    }     // end class

  • Need help :: how to search in nested table/varray data type

    I have the following structure...
    CREATE TYPE lang_con AS VARRAY(15) OF VARCHAR2(50);
    CREATE TYPE rel_con AS VARRAY(15) OF VARCHAR2(50);
    CREATE TABLE Country_n(
    "NAME" VARCHAR2(40 BYTE) CONSTRAINT "COUNTRY_NAME_NOTNULL_N" NOT NULL ENABLE,
    "CODE" CHAR(2 BYTE),
    "CAPITAL" VARCHAR2(40 BYTE),
    "PROVINCE" VARCHAR2(40 BYTE),
    "POPULATION" NUMBER,
    "AREA" NUMBER,
    "LANGUAGES" lang_con,
    "RELIGIONS" rel_con
    after inserting data from 3 different table (country, language, religion) the table looks like this....
    Cyprus cy Nicosia Government controlled area 775927 9250 VARCHAR(English,Greek,Turkish) VARCHAR(Greek Orthodox,Muslim)
    Czech Republic cz Prague Prague 10246178 78866 VARCHAR(Czech) VARCHAR(Orthodox,Protestant,Roman Catholic)
    Germany de Berlin Berlin 82424609 357021 VARCHAR(German) VARCHAR(Muslim,Protestant,Roman Catholic)
    Djibouti dj Jibuti Jibuti 466900 23000 VARCHAR(Afar,Arabic,French,Somali) VARCHAR(Christian,Muslim)
    Denmark dk Copenhagen Frederiksberg Kommune 5413392 43094 VARCHAR(Danish,Faroese,German,Greenlandic) VARCHAR(Evangelical Lutheran,Muslim)
    now I want to get the countries in which german language is being spoken. Actually I need to know how to search in this custom data type of mine....I also need to perform other operation further so really need to know how can I search in this custom data type...
    when I execute the following query....
    select * from country_n cn where cn.languages like '%German%' order by name
    I got the following error....
    Error starting at line 1 in command:
    select * from country_n cn where cn.languages like '%German%' order by name
    Error at Command Line:1 Column:33
    Error report:
    SQL Error: ORA-00932: inconsistent datatypes: expected NUMBER got AHMADM.LANG_CON
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:
    let me know please...looking forward to your replies....
    Thanks,

    Hi,
    Try this:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> SELECT t1.*
      2    FROM country_n t1,
      3         TABLE(t1.languages) t2
      4   WHERE column_value LIKE '%German%';
    NAME                                     CODE CAPITAL                                  PROVINCE                                 POPULATION       AREA LANGUAGES RELIGIONS
    Germany                                  de   Berlin                                   Berlin                                     82424609     357021 <Object>  <Object>
    SQL> Regards,

  • How to search files by wildcard expression

    how to search files by wildcard expression,
    and list all of them?
    for example:
    search file as image*.jpg or ima231*.jpg.
    please give me some code to study.
    thanks in advance.

    following code is a filename filter that support '*' and '?', hope it helps.
    import java.util.*;
    class MyFilenameFilter {
      static public void main(String args[]){
        byte[] in2=new byte[255];
        String filter=null,fileName=null;
        try{
          while(1>0){
            System.out.print("filter (ex: abc*def?.do?):");
            in2=new byte[255];
            System.in.read(in2);
            if((new String(in2)).trim().length()>0) filter=(new String(in2)).trim();  
            System.out.print("filename (ex: abcerdefi.doc):");
            in2=new byte[255];
            System.in.read(in2);
            if((new String(in2)).trim().length()>0) fileName=(new String(in2)).trim();
            System.out.println("filter="+filter+",filename="+fileName+",result="+(chkfn(filter,fileName)? "Matched":"Not Matched"));
        } catch(Exception e){
             e.printStackTrace();
      static boolean chkfn(String chk,String fn)  {//ex:chk=*fg?gh fn=tdiekd.exe, or ex:chk=test.csv fn=k.csv
        boolean rtn=false;
        int x3=0,x4=0,x4Head=0,x4Tail=0;
        if(chk.endsWith(".*") && fn.indexOf(".")==-1) chk=chk.substring(0,chk.length()-2);
        if(chk.endsWith(".") && fn.indexOf(".")==-1) chk=chk.substring(0,chk.length()-1);
        if(fn==null || fn.length()<1) return false;
        if(chk==null) return true;
        if(chk.length()<1 || chk.equals("*") || chk.equals(".") || chk.equals("*.*")) return true;
        int chkLength=chk.length();
        int fnLength=fn.length();
        int newx4Head=-1,newx4Tail=-1;
        int last_asterisk=chk.lastIndexOf("*");
        int first_asterisk=chk.indexOf("*");
        int asteriskCount=0,aindex[]=new int[20],tmp[]=null,index1=-1,cCount=0;
        String cString[]=new String[20];
        chk=chk.toUpperCase();
        fn=fn.toUpperCase();
        char c='0';
        boolean found=false;
        String chkString="";
        //replace each '**' with '*' befroe further action
        while(chk.indexOf("**")!=-1){
          chk=replace(chk,"**","*");
        chkLength=chk.length();
        last_asterisk=chk.lastIndexOf("*");
        first_asterisk=chk.indexOf("*");
        //count the '*' count
        x3=0;
        while(x3<chkLength){
          if(chk.charAt(x3)=='*'){aindex[asteriskCount]=x3; asteriskCount++;}
          x3++;
        //to get the cString[], each string next to '*'
        StringTokenizer st=new StringTokenizer(chk,"*");
        while(st.hasMoreElements()){
          cString[cCount]=st.nextToken(); cCount++;
        //first check the head and the tail
        if(first_asterisk>0){//first_asterisk!=-1 && first_asterisk!=0
           chkString=chk.substring(0,first_asterisk);
           if(chkString.indexOf("?")!=-1){
                 if(fnLength>first_asterisk-1){
                   if(cmp(chkString,fn.substring(0,first_asterisk))==false) return false;
                 } else return false;
           } else if(!fn.startsWith(chkString)) return false;
           x4Head=chkString.length()+1;
        } else if(first_asterisk==0) {
             x4Head=findMatch(cString[0],fn);
             if(x4Head==-1) return false;
        if(last_asterisk!=chkLength-1 && last_asterisk!=-1){
           chkString=chk.substring(last_asterisk+1,chkLength);
           if(chkString.indexOf("?")!=-1){
                 if(fnLength-(chkLength-last_asterisk)+1>-1){
                   if(cmp(chkString,fn.substring(fnLength-(chkLength-last_asterisk)+1,fnLength))==false) return false;
                 } else return false;
           } else if(!fn.endsWith(chkString)) return false;
           x4Tail=fnLength-chkString.length();
        } else if(last_asterisk==chkLength-1) {
             newx4Tail=findMatch(cString[cCount-1],fn.substring(x4Head));
             x4Tail=x4Head+newx4Tail+cString[cCount-1].length();
        if(asteriskCount>1){
          int oldx4Head=x4Head;
          if(last_asterisk!=chkLength-1) {
               if(cString[cCount-2].indexOf("?")==-1){
              x4Tail=fn.substring(x4Head,x4Tail).lastIndexOf(cString[cCount-2]);
              if(x4Tail!=-1) x4Tail=x4Tail+cString[cCount-2].length();
          if(first_asterisk!=0){
            if(cString[1].indexOf("?")==-1){
              x4Head=fn.substring(x4Head).indexOf(cString[1]);
              if(x4Head!=-1) x4Head=oldx4Head+x4Head;
          //before of this, x4head and x4tail are adjusted according to '*', and now it will also adjusted according to '?'
          if(x4Head>-1 && x4Tail>x4Head &&
             chk.substring(aindex[0]+1,aindex[asteriskCount-1]).indexOf("*")==-1 &&
             chk.substring(aindex[0]+1,aindex[asteriskCount-1]).length()!=x4Tail-x4Head &&
             chk.substring(aindex[0]+1,aindex[asteriskCount-1]).indexOf("?")!=-1){
               newx4Head=-1;
               newx4Head=findMatch(chk.substring(aindex[0]+1,aindex[asteriskCount-1]),fn.substring(x4Head,x4Tail));
               if(newx4Head>-1) {
                 x4Head=x4Head+newx4Head;
                 x4Tail=x4Head+aindex[asteriskCount-1]-(aindex[0]+1);
          if(x4Head>-1 && x4Tail>x4Head) return chkfn(chk.substring(aindex[0]+1,aindex[asteriskCount-1]),fn.substring(x4Head,x4Tail));
          else return false;
        } else if(asteriskCount==0){
              if(fnLength==chkLength) return cmp(chk,fn);
                else return false;
        return true;
      static public boolean cmp(String chkString,String fnString){//1.no '*', 2.only for two strings having same length 3.two  strings are uppercase before call this method
        boolean rtn=false;
        int clength=chkString.length(),flength=fnString.length();
        if(clength!=flength) return false;
        for(int i=0;i<clength;i++){
          if(chkString.charAt(i)!='?' && chkString.charAt(i)!=fnString.charAt(i)) return false;
        return true;
      static public int findMatch(String chkString,String fnString){//to find out the correct index postion for the string between two '*'
        int rtn=-1;
        boolean found=false;
        int chkLength=chkString.length();
        int fnLength=fnString.length();
        if(chkLength>fnLength) return -1;
        for(int i=0;i<fnLength-chkLength+1;i++){
          found=true;
          for(int j=0;j<chkLength;j++){
            if(chkString.charAt(j)!='?' && chkString.charAt(j)!=fnString.charAt(j+i)) {found=false; break;}
          if(found) return i;
        return rtn;
      public static String replace(String s, String s1, String s2) {
          if(s!=null && s1!=null && s2!=null){
            int i = 0;
            int j = s.length();
            int k = s1.length();
            int l = s2.length();
            do {
                String s3 = "";
                i = s.indexOf(s1, i);
                if(i == -1)
                    break;
                StringBuffer stringbuffer = new StringBuffer(s.substring(0, i));
                s3 = s.substring(i + k);
                stringbuffer.append(s2).append(s3);
                s = stringbuffer.toString();
                j = s.length();
                i += l;
            } while(i <= j);
          return s;
    }

  • How to search a specific topic in a forum?

    How to search a specific topic in a forum? who can offer me a solution. I'm really appreciate it.

    Enter something in the box next to the words Advanced Search at the upper right and click on the button to display a list of search hits. Then, in the box to the right of the list, click on the word help to bring this Search Help and Tips page up:
    http://search.java.sun.com/search/java/help.jsp

  • How to search whether a seat is available or not?

    Hi,
    I am developing a form in admin module for a call centre where there is a requirement to check whether a seat is available or not? The form contains a search window which the user enters the date in Location,catergory,From_date,to_date,time_from,time_to fields.
    For example if he enters time_from as 06:00and time_from as 14:00 .That means the seat is occupied for 8 hours but is available for the remaining 16 hours. So the search result should show this seat also in the availability list. Every seat hava a unique seat_id.
    another situation is a seat can be allocated between 22:00 and 06:00.That means it is crossing the day.That means that means in a day the seat is allocated from 00:00 - 06:00 and 22:00-23:59. How to search for this?
    The seat can be allocated for any number of hours in a day. It can be 2 hours .3 hours or 4 hours....means there is no particular time slot system.
    Can this be done using a sql query or plsql procedure?
    can anybody help me in this regard
    Thanking you,
    Deekshit

    Hi
    U can use the following query in function.
    SELECT CASE dumm
    WHEN 'X'
    THEN 'OK'
    END
    FROM (SELECT NVL (dummy, 'Y') dumm
    FROM DUAL
    WHERE TO_DATE (new_date_entered in varchar format, 'hh24:mi:ss') BETWEEN TO_DATE
    (date_from in varchar format,
    'hh24:mi:ss'
    AND TO_DATE
    (date_to in varchar format,
    'hh24:mi:ss'
    But need to b careful when the dates r changing. U can check dat by comparing time_from nd time_to values...in case of date change time_from value will be greater than time_to value(assumption==> seat can't be blocked for more than 12 hours). U can actually use the same query by reversing the conditions.. hope this will solve the problem
    Message was edited by:
    Arpit

  • How to search the indexes in 11g Enterprise Manager Console

    Hi,
    After setting the Indexes using Java Embedding for a process, can you please tell me how to search the indexes in 11g Enterprise Manager Console for the particular process.In 10g BPEL Console we have the option of searching the Instances based on Indexes we already set at process level which is inbuilt in 10g. I need the same in 11g .
    Thanks,
    Sagar.

    Hi Sagar,
    You can define composite sensors in your composite.
    Then you will get fields in enterprise manager of that composite instance.(the sensors you have defined will be displayed here)
    You can enter the values based on what you want to search the instance. :)
    Regards
    PavanKumar.M

  • How to search a text in text area?

    Hi All,
    I want to search a text in the text area and it should be like searching by the Find Dialog Box with upward direction or downward direction with case sensitive option.
    I know searching text in a file. But I dont know how to search in the above manner.
    PLz help me.
    Thanx in advance.
    regards

    Ok, starting from the code you sent, I can help with the below code:
       private void findText() {
          // your searching stuff here...
       }Regards.

  • How to search for file in jsp page

    i need help on how to search for a file in a folder where there is a lot of subfolder.like how u search in a document in windows. i need a complete codes in jsp page.
    thank you in advance.
    Message was edited by:
    n_dilah

    no i need to do a search engine in jsp page which is the j2ee.
    i type smth than tat file from any folder will appear the same way when u need to search your file in a document in windows.
    well can u nice people tell me where i can get the codes bcos i stinks when it come to programming.
    thank you very very very much.

  • How to search a special string in txt file and return it's position in txt file?

    How to search a special string in txt file and return it's position in txt file?

    I just posted a solution for a similar question here:  http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=362699#M362699
    The top portion can search for the location of a string, while the bottom portion is to locate the position of a character.  Both can search for a character.
    The position of the character within the file is displayed in the indicator(s).
    R

  • How to search data from a context node.

    Hi Friends,
    Thanks for ur help for previous problem . I am facing some other problem i.e how to
    search data from a context node.
    i have a context node :-
    Car(main node) which consist of details, owners, engine and Brand  as its sub node.
    the value attibutes of difft nodes are:-
    Car-  category
    Details-  Mileage, Price, registration_no, miles_used
    owner -  name, phnno,addrs
    Brand -  main_brand, co_brand
    Engine- Bhp,Rpm
    Now i have to apply a search criteria on the basis of price, miles_used .
    pls help to implement that .
    Thanks & regards
    Pravin jha

    Hi PRAVIN,
                       What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
    Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
    Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
    I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
    Cheers!!!
    Umang

  • How to search this value in oracle database to find out the table

    Hi expert,
    I know there is a value in oracle database, please show me how to search this value in oracle database to find out the table holding this value.
    Many Thanks,

    918440 wrote:
    Hi friends,
    this question is really practical, I already know there is value from application saved in database, I want to search the whole database to figure out which table the value is contained.write SQL that writes SQL to query every table.
    Handle:     918440
    Status Level:     Newbie
    Registered:     Mar 2, 2012
    Total Posts:     20
    Total Questions:     10 (10 unresolved)
    why do you waste time here when you NEVER get any answer to any question you post?

Maybe you are looking for

  • The photo displayed does not match the "film strip" shown below

    Hello everyone, I hope someone can help me. I have started to spend some time with iPhoto, creating events an tagging, naming faces etc. trying to finally put some order against my photo collection and everything has been great until yesterday I noti

  • I am having trouble with a video program not connecting to my web cam. My computer is a 64 bit

    I am using My Video Talk suite to make videos. I have used it before with this computer and it worked fine. My computer is a 64 bit. I recently downloaded the newest version of Firefox and now my video suite does not recognize my web cam and I cannot

  • Using Txn SE97  -How to enable called transactions?

    Hi Experts, I suppose you all had worked in the transaction SE97. For any t-code, SE97 gives a list of called transaticons. Now what i want to know is, how to enable the called transactions given here. When i tried to change the  "Check Indicator" va

  • User defined error management in variance calculation

    Dear Expert, I would like to change the message type for some messages in variance calculation. Path:  IMG/product cost controlling/cost object controlling/product by order/manufacturing order/periodic processing.  According to IMG documentation, the

  • Comparing databases

    hi i need diff between oracle 8i and oracle 9i,oracle 9i with oracle 10g,oracle with sql server,oracle with my sql. please tell me or please give me link to know the differences.