Numeric Wildcards

Please Help!!!!
I was wondering if anyone knew of a wildcard to look at only numeric. For example...
'Not like 4%' is a statement that only looks at 4... numbers. This will bring back 4100 numbers and 4X10 number which we have both of, but I want only the 4100 numbers.
But what I want it to do is have two spaces with a wildcard that will look and make sure they are numeric. The only two wildcards I know are _ (underscore) and % (percent sign). Both of
these wildcards look at both charector and numeric. I don't know if I explained this well enough, so let me know.
Thanks
Shelby

The pattern matching can be done in either way.
1) through like operator
2) using instr function
Your question is, the pattern search should happen only for numeric values and not for alpha-numeric values.
This you can do by altering the query by adding additional where clause to filter out numeric values only.

Similar Messages

  • Vague error message when using wildcards in a numeric search field

    Dear forum readers,
    When a user submits a search string containing a wildcard (e.g. 64%) in a numeric search field of a JHeadstart generated search section, the application returns with an error message like "For input string: %2".
    I'd like to show a more user-friendly message e.g. "Wildcard characters are not allowed in search field blablabla".
    Any suggestions on how this can be achieved would be most welcome.
    Regards,
    Ibrahim

    Well, I believe JHeadstart does not really have this functionality.
    One way is use a Query Operator 'startsWith', but then you always query like LIKE '<entered search value>%'
    This is probably not what you want...
    But you could hack it into advancedSearch in YourApplicationModuleImpl
    try {
    if (viewCriterium.getQueryValue() != null) { //This is where exception JHS-00116 is raised...
    value = viewCriterium.getQueryValue().toString();
    } else {
    value = null;
    catch (NumberFormatException ex) {
    //insert check for wildcard
    value = viewCriterium.getValue().toString();
    if (value.indexOf('%')>=0) {          
    sLog.debug("Ja, een wildcard!!!");
    operator = "LIKE";
    } else {//original exceptionhandling code here...
    ...and a bit later, add test for "LIKE":
    if (viewCriterium.isDate() || viewCriterium.isString() || "LIKE".equals(operator)) {
    value = "'" + value + "'";
    very nasty code, and does not raise an exception for searches like '%xxx'
    Good luck,
    HJH
    Edited by: HJHorst on Mar 5, 2009 12:03 AM

  • Wildcard search for numeric values using select ?

    Hi,
    I want do wildcard search for numeric fields of the table.
    For charcter/string i have used - select * from XX_TABLE where param1 like 'SS%'. But this query doesnt work when para1 is numeric. Please let me know first whether this is possible ? if yes how to achieve it ?
    Thanks in advance,
    Shrinivas

    Hi Jack,
    The numeric field is of  8 digits, so when i give search critera as '66', it should return values 66000000, 660000, 6600 etc. so i was not able to give between some range. I also tried storing all these values in internal table and the segregate the values it contains '66*'. This worked well but requires lot of coding effort.Please suggest if you guys have any better method ?
    Thanks,
    Shrinivas

  • PL/SQL function body returning SQL query - ORA-06502: PL/SQL: numeric or value error

    I'm attempting to dynamically generate a rather large SQL query via the "PL/SQL function body returning SQL query" report region option.  The SQL query generated will possibly be over 32K.  When I execute my page, I sometimes receive the "ORA-06502: PL/SQL: numeric or value error" which points to a larger than 32K query that was generated.  I've seen other posts in the forum related to this dynamic SQL size limitation issue, but they are older (pre-2010) and point to the 32K limit of the DNS (EXECUTE IMMEDIATE) and DBMS_SQL.  I found this post (dynamic sql enhancements in 11g) which discusses 11g no longer having the 32K size limitation for generating dynamic SQL.  Our environment is on 11gR2 and using ApEx 4.2.1.  I do not know which dynamic SQL method -- DNS or DBMS_SQL -- ApEx 4.2.1 is using.  Can someone clarify for me which dynamic SQL method ApEx uses to implement the "PL/SQL function body returning SQL query" option?
    As a test, I created a page on apex.oracle.com with a report region with the following source:
    declare
      l_stub varchar2(25) := 'select * from sys.dual ';
      l_sql  clob := l_stub || 'union all ';
      br     number(3) := 33;
    begin
      while length ( l_sql ) < 34000 loop
        l_sql := l_sql || l_stub || 'union all ';
      end loop;
      l_sql := l_sql || l_stub;
      for i in 1 .. ceil ( length ( l_sql ) / br ) loop
        dbms_output.put_line ( dbms_lob.substr ( l_sql, br, ( ( i - 1 ) * br ) + 1 ) );
      end loop;
      return l_sql;
    end;
    The dbms_output section is there to be able to run this code in SQL*Plus and confirm the size of the SQL is indeed larger than 32K.  When running this in SQL*Plus, the procedure is successful and produces a proper SQL statement which can be executed.  When I put this into the report region on apex.oracle.com, I get the ORA-06502 error.
    I can certainly implement a work-around for my issue by creating a 'Before Header' process on the page which populates an ApEx collection with the data I am returning and then the report can simply select from the collection, but according to documentation, the above 32K limitation should be resolved in 11g.  Thoughts?
    Shane.

    What setting do you use in your report properties - especially in Type and in Region Source?
    If you have Type="SQL Query", then you should have a SELECT statement in the Region Source. Something like: SELECT .... FROM ... WHERE
    According to the ERR-1101 error message, you have probably set Type to "SQL Query (PL/SQL function body returning SQL query)". In this situation APEX expects you to write a body of a PL/SQL function, that will generate the text of a SQL query that APEX should run. So it can be something like:
    declare
    mycond varchar2(4000);
    begin
    if :P1_REPORT_SEARCH is not null THEN
    mycond:='WHERE LAST_NAME like :P1_REPORT_SEARCH ||''%''';
    end if;
    return 'select EMPLOYEE_ID, FIRST_NAME, LAST_NAME from EMPLOYEES ' ||mycond;
    end;
    And for escaping - are you interested in escaping the LIKE wildcards, or the quotes?
    For escaping the wildcards in LIKE function so that when the user enters % you will find a record with % and not all functions, look into the SQL Reference:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm
    (You would than need to change the code of your function accordingly).
    If you are interested in escaping the quotes, try to avoid concatenating the values entered by the user into the SQL. If you can, use bind variables instead - as I have in my example above. If you start concatenating the values into the text of SQL, you are open to SQLInjection - user can enter anything, even things that will break your SQL. If you really need to allow users to choose the operator, I would probably give them a separate combo for operators and a textfield for values, than you could check if the operator is one of the allowed ones and create the condition accordingly - and than still use bind variable for inserting the filtering value into the query.

  • Use of % for wildcard matching in cursor

    i can use the wildcard character('%') in a statement something like this :-
    where city like nvl(cit,'%') in which if the null value is encountered in the variable 'cit', then city could be anything.
    Now, my question is can i use this wildcard character('%') in a between condition like:
    where serial_no between nvl(from_serial,'%') and nvl(to_serial,'%')
    I guess we cannot use the wildcard character('%') in a between condition like we can in a 'like' statement. So, how do i use the wildcard character('%') in a between statement. Please help in resolving the problem.

    Jatin
    You are correct, wildcards only work with LIKE.
    How you write your where clause depends on what datatype is involved. Assuming serial_no is numeric:
    where serial_no between
    nvl(from_serial,serial_no-1) and
    nvl(to_serial,serial_no+1)
    OR you could do it more explicitly
    where (from_serial is null
    or serial_no >= from_serial)
    and (to_serial is null
    or serial_no <= to_serial)

  • How to Create wildcard in BEX - BI7.0

    Hi Experts,
    Can anybody give me some inputs on my query for wildcard in BEX?
    Here is my requriement below :-
    In BEx, is there a way to specify a wild card?? 
    Example: lets say I want to filter all Work Orders starting with “P”. Can I specify the filter as (Work Order <> P*).
    Your views are appreciated..
    Thanks
    surendra

    Hello
    I have done similarly like this,
    but when i executed the report, it says the CP is not supported and characteristics is numeric.
    my scenario is i want to restrict material group starting with 1L* like 1L11, 1L12, 1L13..,etc
    I have used customer exit variable.
    CASE I_VNAM.
      WHEN 'IVMATGRPL'.
      IF i_step = 1.
       L_S_RANGE-LOW = '1L*'.
       L_S_RANGE-HIGH = ''.
       L_S_RANGE-SIGN = 'I'.
       L_S_RANGE-OPT = 'CP'.
       append l_s_range to e_t_range.
    ENDIF.
    ENDCASE.
    what could be the problem?
    Thanks
    Edited by: Mohammad Usama on Jun 22, 2009 5:37 PM

  • Wildcard in SP parameter

    I have field called UnitNumber, consisting of a letter suffix and up to 7 digit numerical sequence. Example: G0008591
    I'm trying to use wildcard in my procedure to account for a user sending the prefix and dropping leading zeros. User may type G8591
    (a.UnitNumber
    like
    '%'+@unit
    +'%')
    I'm calling this procedure using SSRS. What am I missing?
    .samuel

    Try
    REPLACE(a.UnitNumber,'0','') like '%'+@unit +'%')
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Content ID with wildcard

    Hi all,
    When our system was set up originally (before my time here) it was decided that the content ID would contain an underscore, eg UCM_000000. as a result, when users search for a match on the content ID for obvious reasons they are using the entire content ID including the underscore.
    Would this cause slower search times due to the underscore being a wildcard?
    FYI we are running 10gR3 app, 11g DB with Oracle DATABASE.FULLTEXT search engine.
    cheers

    According to the documentation ( http://docs.oracle.com/cd/E21043_01/doc.1111/e10797/c04_finding_files.htm#g1300865 and particularly http://docs.oracle.com/cd/E21043_01/doc.1111/e10797/c04_finding_files.htm#CJAEAHED ) only asterisks and question marks are used as wildcards for metadata search fields. No information about underscores - (according to this: http://docs.oracle.com/cd/F49540_01/DOC/inter.815/a67843/cqspcl.htm they are wildcards for Text queries in Oracle DB)
    However, Kyle in his article https://blogs.oracle.com/kyle/entry/site_studio_naming_best_practi recommends not to use underscores for Site_ID as it "causes numerous issues", so you'll be on a safe side to get rid of them.

  • Error while assigning a character value to a numeric variable.

    I fire a sql statement and check the number of rows returned by the sql.
    I check this result with the application logs.
    The application logs keeps the sqls fired by the application and the no of rows returned, in the example below the sql returned 8454 rows.
    My script compares the two results.
    ***********Application Log***********
    4/14/2008 11:15:01 AM: 0059 SQL SELECT "CLUSTER_CD",
    4/14/2008 11:15:01 AM: 0060 "PRODUCT_DESC",
    4/14/2008 11:15:01 AM: 0061 "TEAM_CD"
    4/14/2008 11:15:01 AM: 0062 FROM "OPS$TMS"."MAP_CLUSTER_TEAM_PROD"
    4/14/2008 11:15:01 AM:      3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, 8,454 lines fetched
    ***********Application Log***********
    My script:
    #!/bin/ksh
    typeset -i resA
    typeset -i resB
    opstms_conn_string="abc/[email protected]"
    set `sqlplus -s $opstms_conn_string << EOF
    set pages 0
    WHENEVER SQLERROR CONTINUE
    SELECT count(*)
    FROM MAP_CLUSTER_TEAM_PROD;
    exit
    EOF`
    resA=$1 ##returns 8454
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
    ##resB returns 8,454
    ## here i get syntax error
    if [ $resA -eq $resB ]; then
    echo "QA passed for sql1"
    else
    echo "QA failed for sql1"
    fi
    The problem is as resB is integer variable it does not accept character value: 8,454 so returns a syntax error:
    How do I change the value assigned to resB into a numeric variable?
    error:
    + grep 3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, BCVP_Main_Loader.qvw.log
    run.ksh[52]: 8,454: syntax error

    Change:
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
    to this:
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}' | tr -d ,`
    to drop the comma. Or you could do it in awk(1):
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{ gsub( /,/, "", $10 ); print $10}'`
    Or you could to it all in awk(1):
    resB=`awk '
    /3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD/ {
    gsub( /,/, "", $10 )
    print $10
    ' BCVP_Main_Loader.qvw.log`
    (This example was not tested, it's just for a model.)
    Someone more of an SQL guru than I can probably tell you how to change your numeric locale to avoid presenting those commas in the first place and avoid the problem.
    HTH

  • Brand New MacB Air and i haven't been able to get passed the format which has had to be done twice because, I have a French Numeric Keyboard and Language in English.  The minute I type in my password, the keyboard gives me letters that i did NOT type.

    I live in Switzerland and can only buy a Mac Air with a French or German keyboard, no chance to buy an English keyboard Mac here,.  When setting up  I chose the French numerique keyboard, although there are two choices French or French numerique.  I put in my language as English.  When all was set up I came to the start page and had to put in my password, by the grace of g....I just happened to see the first letter I typed before it turned into a dot.  My password which was supposed to start with the number 2 showed a french e with accent before it quikly became a dot.
      Because of the dot system, this meant that I had no clue what the keyboard was typing as my password ...........and true enough my password was not accepted despite my trying all combinations.  I have had to reformat twice now thanks to Apple Chat and both times my password was not accepted.  I am in the process of formatting it again, this time on my own.  If the Start page does not accept my password again this can only mean that the Mac left the factory with faults.  I could not be more disappointed with the money spent and the time and trouble that Apple Chat and I have spent in trying to correct a brand new out of the box Mac.  I have a cheap Toshiba laptop also with a french keyboard and english language which gave me no trouble at all.  I am not impressed with the so called King of computers!  First of all the dot system is daft.  People want to be able to see and confirm their passwords before they are set for good.  Second,  this problem is going to give me a lot of grief.  Switzerland business is not renowned for its after sales service or the time it takes to do repairs.  When I had an issue with my Vaio laptop which was still under warranty, they kindly picked it up from my house, repaired and promptly returned it.  How's that for good proper service.

    i didn't read a lot of your 2nd paragraph, but it seems like the password is the issue, right?
    do a true clean install
    reboot your machine and hold down command+option+r, you should see a spinning globe - if you don't see the globe or anything that reads internet recovery, shut down and try again
    at menu, chose disk utility and once there, find your HD on the left side, select the physical name and erase it as mac journaled
    exit disk utlity
    at menu, choose install OSX
    this time, when it asks for a password just hit continue, it will let you complete without a password
    you should be able to get into your laptop, now figure out what password you'll be able to use with your kb issue

  • How can I set an event to repeat on a week day rather than a numerical day of each month?

    How can I set an event to repeat on a week day rather than a numerical day of each month? I see an option at the bottom of the repeat window .... but I cannot use it. Actually, when I try it freezes up my Calendar.
    Lorrene Baum Davis

    These scrrenshots are from Snow Leopard - I would think that Lion wouldn't be too much different.

  • Thanks for responding.  Since I upgraded ITUNES to IOS 6, my IPOD Touch no longer works at all.  I had numerous apps, music and videos on this touch.  It made me restore to factory reset and it still does not work!!! Nothing I do will work on this touch n

    Thanks for responding. Since I upgraded ITUNES to IOS 6, my IPOD Touch no longer works at all. I had numerous apps, music and videos on this touch. It made me restore to factory reset and it still does not work!!! Nothing I do will work on this touch now. I have so much data on this, I don't want to loose or have to restore!
    Can you help me?
    Thanks

    If you restored to factory settings/new iPod and still have the problem that indicates a hardware problem.
    Make an appointment at the Genius Bar of an Apple store..
    Apple Retail Store - Genius Bar

  • Alpha Numeric - GL account numbering

    Hi
    Our client is going for alpha numeric GL accounts. FS00 will allow creating alpha numeric GL accounts. But i wanted to what may be problem in future?
    I want to know will any account determination settings like OBYC (FI - MM Settings), VKOA (FI - SD settings), AO90 - Asset accounting GL determination or any other FI process will give problem at the time of configurations or in future?.
    Please help me on this. What can be the points on the basis of which i can tell client that they should go for NUMERIC GL accounts only and not Alpha Numeric.

    No other feedback ?
        Avoid using alpha characters – they will create problems in sequencing
    and sorting data in reports, assigning codes, using ranges, and when
    creating validation and/or security rules”
    What does security rules in this context ?

  • Can a .pdf created with Livecycle allow a user to enter a % symbol in a numeric or decimal field?

    What I've found so far is that the only way to get the % symbol into a numeric/decimal field at all is to set the "display pattern" to display the % symbol after numbers have been entered into the field.
    The reason I want the field to be numeric and not text is because I have to run a FormCalc caculation that populates a third field.
    (NumericField1 * Numeric Field2*) + NumericField1

    Thanks for the reply Niall.
    I ended up chanigng the numeric field to a decimal field instead, and added the following display pattern: num{zzzz9.99'%'}
    So although the user can't enter a % symbol into the field, a % symbol automaticaly populates when the user enters a number.
    My criteria involved ensuring that a user could not enter a number with more than two numbers after the decimal, so I also set a trailing digits max of 2 (in the Obect > Field settings)
    This is the FormCalc formula I used in the "calculate" event to calculate the salary increase amount request: (DecimalField1 * NumericField2) *.01 + NumericField2
    This formula is meant to calculate the salary amount a manager is requesting their employee's salary be increased to.

  • Using wildcards (*) in sender file adapter - FTP type

    Hi guys!
    Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
    I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
    Thanks for info!
    Olian

    Thanks for all replies..
    I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
    *, ., *.dat, ...  nothing like that works..  Just exact file name.
    I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
    Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
    Is there anybody with this experience, that it works?
    Thank you!
    Olian

Maybe you are looking for

  • Crystal report ReportPageViewer problem using Stored Procedure

    Hi, I'm using the ReportPageViewer component in my jsf page, to visualize cystal reports on my web application. Everything is working fine when my crystal report queries a table. But, for performances issues, we've changed this to use a stored proced

  • Creating custom LOV in 11.5.10.2

    Hi, We are new to Web ADI and are having problems with creating custom LOV. It seems that custom templates can only have poplists defined. Is this true? And if so, how do we get around the problem of the 256 row limitation? Has anyone created lovs fo

  • How to display outsream from a servlet in a JSP

    I wrote a jsp file to call a Servlet, then want to display the result from the servlet in another jsp file. Anyone can give me possible solution or an example to illustrate it. Many thanks in advance. the file that call servlet in a jsp is as follow

  • Nested Tables and Full Table Scans

    Hello, I am hoping someone help can help me as I am truly scratching my head. I have recently been introduced to nested tables due to the fact that we have a poor running query in production. What I have discovered is that when a table is created wit

  • Delete Query takes more time

    Hi, My database in 10g(10.2.0.4), I fire delete query which deletes 5 Lacs records from the table but it is taking more time to delete. My table and indexes on that table in Nologging mode, Database in Archive Log Mode. Can you please help to minize