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);

Similar Messages

  • 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

  • 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

  • Generating Random Alpha numeric Salt String using MD5 or other algorithm

    Hello,
    I have a requirement where i need to generate a random alpha numeric salt for MD5 algorithm. Is there a best way to generate this salt ?
    The alpha numerics should confine to 5 digits with possible values for each digit being (a-z), (0-9), (A-Z).
    Any good random generator for salt would be appreciated.
    Thanks.

    Hi there,
    I think the book you read is the book "Java Security", I have that one too.
    Please read all those pages before this code.........
    In this code, it used the RSA algorithm to do the encryption and JDK DOES NOT support
    RSA algorithm....
    Beside, this line
    KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA", "BC");It implies the BouncyCastle security provider is in use.... so
    www.bouncycastle.org might be a good place to start with....
    Good luck!

  • 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.

  • How to generate password?

    Dear all,
    Do anyone know how to generate the password??
    I don't know use which method to that aim...
    Can anyone give some advices?

    Here's the code:
    public class RandomPassword
         int l = 0;
         int h = 5;
         String charr[] = {"A", "B", "C", "1", "2", "3"};
         private String[] rarr = new String[6];
         RandomPassword()
              buildPassword();
              printPassword();
         private void buildPassword()
              int n;
              for (int i = 0; i <= 5; i++)
                   n = getRandom(l, h);
                   rarr[i] = charr[n];
    private void printPassword()
              for (int i = 0; i <= 5; i++)
              System.out.print(rarr);
              System.out.println();
    private int getRandom( int lower, int upper )
    double nNum = Math.random();
    int nDif,nResult;
    while ( true )
    nDif = (upper + 1) - lower;
    nResult = lower + (int)( (double)nDif * nNum );
    if ( ( nResult >= lower ) && ( nResult <= upper ) )
    return nResult;
         public static void main(String args[])
              try
                   new RandomPassword ();
                   System.exit(0);
              catch ( Exception e )
                   System.out.println ( "Can not start program");
    Klint

  • 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 do I apply a numerical value to a word in numbers

    For example - decision maker = .75

    What is the relationship between the 'word' and the numerical value?
    If it's a mathematical relationship, your use a formula.
    If it's arbitrary, then you need a table showing the value associates with each word (or in this case, phrase).
    Formula in column B of Main:
    B2: =VLOOKUP(A,Lookup :: A:B,2)
    Filled down to B10.
    To avoid the error messages in B6 to B10, Enclose the formula in an error trap as below:
    B2: =IFERROR(VLOOKUP(A,Lookup :: A:B,2),"not found")
    This will replace the error triangle with the words 'not found'.
    Regards,
    Barry

  • 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

Maybe you are looking for

  • Unable to read checkbox tag value in workshop

    I'm trying to embed a repeater tag in a form, the JSP code is, the requirement is to get a list of records and display them to the user. The user then has to select a particular row of values and this is sent back to the database. I am able to displa

  • Newbie Question re stacks, import options, & color labels

    I probably shouldn't just group together multi-topic questions, but creating a new topic for each one seemed wasteful. I'm just starting to migrate to Lightroom from PSE, so I have a few questions that I couldn't find answers to. 1. Can I change the

  • Problem with newly installed JDK1.3.1

    hello people, I have just installed JDK1.3.1_01 version. My O/S is Windows 98 /Nt compatible. Somehow the permanent path setting instruction of Windows ME worked for me,have succesfully set the path at autoexec.bat file. I have written my source code

  • Items not copied but computer IS authorised. Help please.

    Error message on synch always reads: "some of the items in the itunes library ...were not copied to iphone because you are not authorised fro them on this computer. I jhave authorised the computer, repeatedly. Any ideas how to solve this? All I can t

  • PI_Basis

    Hi, I'm running R/3 4.6C with pi version 2004_1_46c sp 8.I want to know which version should be in my 3.0B BW system - (this system is running 2004_1_620 pi_basis) after upgrading my r/3 system to ecc6 - i understood that in ecc6 the pi is a part of