How to Return only alpha-numeric Values

In my query, I want to return only records for which data in a specific column is alpha-numeric. Any records having this field as NULL, or containing symbols, I want to exclude. What's the best way to do this?
Thanks,
Brice

select str from tab1
where str is not null
and translate(str, '_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','_') is null
/Regards
Dmytro

Similar Messages

  • How to generate password alpha numeric value

    dear friends,
    i have written a simple pl/sql to generate a password.
    declare
    cursor c1 is select * from passwd;
    begin
    for I in c1
    loop
    if I.pfno < 3000 then
    update passwd set pwd=I.pfno where i.pfno=pfno;
    ELSe
    update passwd set pwd=lpad(round(I.pfno/20520),4,'0') where i.pfno=pfno;
    commit;
    end if;
    end loop;
    end;
    In this the pfno is 8 digit alpha numeric. I get password generated when it is only numeric but how could i get if pfno is like 04MAS155.
    Kindly help as i have to generate the same as early as possible. I have already been given with procedure to generate random password by our guys but still as i had already generated password to some employees in my concern based on querries like above i request your help to generate for alpha numeric 8 digit number.

    -- get a random string
        FUNCTION string (opt char, len NUMBER)
              /* "opt" specifies that the returned string may contain:
                 'u','U'  :  upper case alpha characters only
                 'l','L'  :  lower case alpha characters only
                 'a','A'  :  alpha characters only (mixed case)
                 'x','X'  :  any alpha-numeric characters (upper)
                 'p','P'  :  any printable characters
            RETURN VARCHAR2;  -- string of <len> characters (max 60)
        PRAGMA restrict_references (string, WNDS);

  • Query only non numeric values in a column

    How to query only non numeric values in a cloumn.
    For example:
    Table1 has a column1(col1)
    Values:
    Row Value
    1 27376
    2 47D99
    3 83039
    4 DKFI*
    5 3J6
    Query should retrieve only rows(2,4,5).
    Thanks! for help
    Murali

    Version 2(PL/SQL) above is not clear enough, It can be tuned to the following:
    -- Create a function
    Create or replace function IsVARCHAR(pCol VARCHAR2) return VARCHAR2
    AS
    vNumber NUMBER := 0;
    begin
      vNumber := to_number(pCol);
      RETURN NULL;
    Exception
      When Others Then
        RETURN pCol;
    End;
    -- To See VARCHAR values (alpha-numeric) only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NOT NULL;
    -- To See NUMBER values only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NULL;Versatility here with PL/SQL, but I personally like SQL versions.
    Thx,
    SriDHAR

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

  • How to display 'Alpha numeric values' in lower character?

    Hi,
    We have 'Alpha numeric value' in one column and i need to display alphabets in lower character.
    I tried but throwing error.
    SQL> select * from a439487.ora_dev_inventory;
    HOST_NM HA INV_DT
    SMMK94 - 21-AUG-08
    SQL> select to_lower(HOST_NM) from a439487.ora_dev_inventory;
    select to_lower(HOST_NM) from a439487.ora_dev_inventory
    ERROR at line 1:
    ORA-00904: "TO_LOWER": invalid identifier
    I want 'HOST_NM' to be displayed in lower value.
    I need o/p like 'smmk94'.
    Any idea?

    Where did you find the TO_LOWER function? Can you
    show us?I would guess it was just an assumption based on the fact we have to_char, to_date, to_number...
    ;)

  • BEx report hangs- selecting Alpha numeric values

    I am working on the existing customer report
    customer is the selection parameter for my report.
    Issue is Customer has numerical and alpha numerical values.
    If i give parameter rangs of value is numerical
    01 - 500 query works fine
    01-50cust1
    50 cust1 - 195 cust2
    query hangs.
    Is their any way we can improve the query performance .
    for searching alphanumerica values.
    I have a workbook is built based on the query.
    morethan 6 queries attached in the sheet 1....sheet2
    each sheet has it is own query with values.
    when I refresh and execute the workbook with the customer alphanumerica values it hangs.
    Query is built based on the multiprovider.
    Please help me onthis

    Hello,
    Try exporting in the 'fully formated grids and text'. It shouldl give you the 'member alias' used in the report.
    Looks like if you export in the 'querry ready grids and text' it will show the 'member name' as in database although the report may have used the 'member alias'.
    Regards

  • How do u convert a numeric value to char

    hi,
    how do u convert a numeric value NUMBER(22) to a character value.... like a to_char() function?
    i've tried the CAST function it won't work.

    Hi,
    Use of CAST function will convert NUMBER to CHAR but it takes a lot of time if there are large number of recrods.
    Syntax:
    CAST(col_name AS char)
    I have tried this, it worked fine for less records.
    Are you getting any error while using cast function or while querying..
    As far as I know it won't give error in these cases (if correct syntax used) but it will take very much time (depending on the number of records) while querying.
    -Vency

  • Alpha Numeric Values

    Hi
    IS it supported in GL code combinations to have a alpha numeric values in key segment values .. we have a project segment in our chart of accounts and need the aplpha numeric values eg PRT001 , ADT001 etc . We do have some customizations and wondering if code combinations would have any impact
    Thanks
    Veda

    Yes you can have alpha numerics.
    Regards,
    Gareth

  • How do I assign a numeric value to an alpha character within a form and still run a total?

    I am trying to build an attendance sheet where P=Present, A=Absent and so on.  I've created the summary field correctly however the individual fields will only take numeric characters.  I would like for the user to be able to enter P, the P stay there visually but have a "real value" of 1 and then have a numerical total at the end.  In other words, P=1, A=0, etc...
    Thanks in advance for your help!
    Lucy

    Hi Lucy
    Create a text field called "Total" and make the following its custom calculation script:
         var presentDays = [];
         for (var i=0; i<this.numFields; i++) {
             var f= this.getField(this.getNthFieldName(i));
             if (f.value=="P" || f.value=="p")
             presentDays.push(1);
         var p = presentDays.length;
         this.getField("Total").value = p;
    The above will search through your form and find all fields with "P" or "p" in them, in which case it adds 1 to the total and displays it in the "Total" field.
    I hope this helps.
    Michael

  • How to 'Only' allow Numeric value in the Edit Box in AcroDialogs

    Hi all,
    I've create an AcroDialog wizard, I need to allow onlu numeric values in the Edit Box. Can someone please help me with this validation?
    Regards,
    Chris

    There isn't a keystroke event for custom JavaScript dialogs, or any proper interactive events for the fields.  You can validate fields when the user presses OK, and you can test fields when the user changes focus by setting the "Action" property for the field.  But the only practical way to restrict user input to numbers is to use George's suggestion.  There is a number property for the fields but it has an undesirable side affect and I never use it.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • How to return more than one value from a  function

    hello everybody,
    Can anyone tell me how to return more than a single value from a function, the problem is i have 4 points,
    2 points form one line ,another 2 points form 2nd line ,each point is 3 dimensional(x,y,z coorinates) so i will pass these values to func(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4), i will find the point of intersecton of two lines and i will get it as x,y,z , now how to return these 3 coordinates,usually the function returns only one value, please help me to solve it out.
    Thanks.

    I think the easiest way or trick here is (easiest isn't always the best as we know, but atleast this one will work) to create simple data array. and pass that. Create an array with:
    <code>
    class justArray {
    int x=0
    int y=0;
    int z= 0;
    ...somewhere
    justArray[] points= new justArray[4];
    points[0].x= ..
    points[0].y= ..
    points[0].z= ..
    points[1].x= ..
    return points[]
    </code>

  • Given a string, how do you find the numeric value in sparse ring?

    Situation: I receive the string value of the sparse ring, and a control reference to the same type of control, but not the control that sourced the string. How can I convert the string, into the actual numeric value of the ring? For example:
    Using the "VISA Select Event Type" ring (Functions -> Instrument I/O -> VISA -> Advanced -> Event -> Select Event Type.ctl), lets say I get the string "ServiceRequest" how do I convert that into 1073684491, the actual value of the ring?
    This is a rework of an existing function that worked fine with "normal" rings.
    Thanks.

    Unfortunately this method will not work, its a generic routine that must be able to take any ring, so I can't hardwire the cases to known outputs. And, of course, searching the array of Strings[] will just find me a useless index.
    My interm solution is this:
    1) pick a small, but likely range of possible values for the ring
    2) iterate through these values, assigning each one in turn to ring
    3) read the RingText property to see if it matches the passed string
    4) if it does, then exit. If it doesn't keep looping.
    5) if no value produces a matching string, declare defeat (raise an error or produce other output that indicates a match could not be found).
    The routine only runs in the UI so I am not too concerned about the time delay this method will i
    mpose, but I would greatly appreciate a smoother solution.
    Thanks for your suggestions.

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

  • How do I assign a numerical value to text cells in cartesian products?

    Hi, this is more of a two part question.
    Question 1
    I need to be able to assign numerical values (Table Value £ of set up) to text cells (Set Up).
    1. The table "Combinations" then uses the formula
    IF($A3≤Information::$B$8, MOD(INT((ROW(cell)−3)÷PRODUCT(C$1:$G$1)), B$1), "")
    to take info from the "Information" table and create all possible permutations of "Set Up"
    2."List" is the printed list of "Combinations"
    3."Output of list" concatenates the data from "List".
    Question 2
    4. How do I print out the total numerical value of the concatenated string of "Output of List" into Output (£) of List"?

    >
    When posting code or code snippets. HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
    Here is how the first code snippet would have appeared in code tags.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    float num1, num2, num3, result;
    num1 = Float.valueOf(jRadioButton1.getMnemonic());
    num2 = Float.valueOf(jRadioButton2.getMnemonic());
    num3 = Float.valueOf(jRadioButton3.getMnemonic());
    result = num1+num2+num3;
    jTextField1.setText(String.valueOf(result));And while I'm on the subject of retaining the indentation of the original sample, please use one of the two common conventions for indenting code blocks. E.G.
    Convention 1:
    class TheClass {
        TheClass() {
    }Convention 2:
    class TheClass
        TheClass()
    }

  • How do I allocate a numerical value to a 5 part likert scale question

    I have a survey questionaire and the 15 questions are all arranged on a 5 part 'Liket scale' of strongly agree to strongly disagree.
    How do I allocate numerical values to each question response? 
    I don't want the respondents to see the scoring.
    The reason I need to do this is some response lines are reverse scored. That is to say some lines would be scored 1 to 5 and other lines 5 to 1.
    I think this feature is available on survey monkey.
    Is it available in Acrobat X Pro or Formscentral?
    I'd appreciate your suggestions
    Kind regards
    spreid1

    Hi,
    You can assign numerical responses to the likert answers as follows:
    1. Go into the response table and select the "Table" toolbar button:
    2. Select the header for your Likert questions in the response table.
    3. Click the "Choices" button on the toolbar and select "Edit choice list..."
    4. Select the checkbox for "Assign data values to choices".
    5. Enter the choice data values in the right-hand column.

Maybe you are looking for