Using the function RowIdToRowNum to create a unique identification number

Hello
I have an obligation to create a unique number that can be used for an authorization number. The client is already displaying the RowId on the screen in order to use it as directly as the authorization number is originally a security problem. Rep of the screen viewing can predict the authorization number, just by looking at the row ID. The process is that a manager verifies a 'Question of authorization' checkbox and workflow implements the authorization number with a prefix of customer defined and some of the digits of the ID line.

The solution I tried to use the RowIdToRowNum function to convert the ID number online. Documentation indicates that the number of output should look like this:
Expression - RowIdToRowNum ("< AccountID > '")
Result - 38-57119344

What I mean in the workflow is in the following format: 0 < 10c0c0o0u0n0t18d0 > 0. Not the most presentable format above. Anyone have any idea why this is happening and how to fix it?

If this is not the case, no one knows other ways to create a unique authorisation number. I also thought about a string of time based as YYMMDDHHMMSS. It works, not exactly predictable, but has a number 12-digit. Would be nice if it could be shorter.

I will update this format when the staging is back. In the meantime, if anyonw has ideas about this I would appreciate it.
Kind regards
Charley

Published by: ckscott on March 24, 2010 15:58

Published by: ckscott on March 26, 2010 09:29

It seems that the syntax in the online help is incorrect.

I used the following syntax in many places. Try this.
RowIdToRowNum ([])

Tags: Oracle

Similar Questions

  • Create the view and by using the function that returns a type oracle

    Following is possible?

    A function returns an ORACLE object Type, and I want to use this feature, in my opinion, it is possible to access each field of the type once the function is executed and make a column in the view?
    create or replace TYPE SOME_INFO AS OBJECT
    ( 
      CHARGE FLOAT,
      SOME_DATE DATE,
      SOME_VAL VARCHAR(50)
    );
    
    CREATE OR REPLACE
      FUNCTION CALCULATE_INFO
        (
          p_chargeId NUMBER)
        RETURN SOME_INFO 
      AS 
      v_some_info SOME_INFO := new SOME_INFO(0, null, null);
    BEGIN
     
    -- function body populates the v_some_info
    return v_some_info;
     
    END calculate_info;
    Now, I want to use the function according to me - if the underlying query of the view follows-
     select c.*, calculate_info(c.charge_id) as someInfo from some_charge;
    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val? I can put them as columns in the view?

    If you use only functions that return a single value in a view?

    Thank you
    Mustapha

    Published by: Tina Giri on April 16, 2009 05:47

    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val?

    SQL>  create or replace type some_info
    as
       object (charge float, some_date date, some_val varchar (50));
    /
    Type created.
    
    SQL>  create or replace function calculate_info (p_chargeid number)
       return some_info
    as
       v_some_info   some_info := new some_info (0, null, null);
    begin
       -- function body populates the v_some_info
       return v_some_info;
    end calculate_info;
    /
    Function created.
    
    SQL>  select your_view.someinfo.charge,
           your_view.someinfo.some_date,
           your_view.someinfo.some_val
      from (select c.*, calculate_info (c.empno) as someinfo
              from emp c) your_view where rownum <= 3
    
    SOMEINFO.CHARGE SOMEINFO SOMEINFO.SOME_VAL
    --------------- -------- --------------------------------------------------
                  0
                  0
                  0                                                            
    
    3 rows selected.
    
  • Color image is not displayed when we call using the function DAL (LOGO)

    Hi all

    To change a picture of the legacy of the new Image in our MRL, the legacy Image is used by a lot of Faps (sections).

    (1) if we create the new article with new Images, the process becomes complex, as we need to check all the triggers and forms associated with it.so, we plan to create a field (with the same position as picture) DAL with functions of LOGO use

    EX:

    If (#process = 1)

    LOGO ("Idea", Fieldx (), Fieldy ())

    on the other

    LOGO ("LegacyImage", Fieldx (), Fieldy ())

    End

    Return("")


    Problem: The new Image is colored but when printed (called using "DAL") that is the impression that 'Black and White')

    We tried to use 'Refresh() '.


    Kindly help me with solutions,


    Thanks in advance

    Try to use the function ChangeLogo DAL instead.

    Change a logo on a section that has the set of attributes "print in color.

    This preserve the parameter "Print in color" and the logo print in color.

    See Re: how to get the graph to print in color when it is added using script

  • Using the function PLSQL return Record Type Index of Tables in ADF

    I have a PLSQL function, a return type. My ultimate goal is to take this binary integer index Table and print it on the screen...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table ;
    END my_pkg;


    OPTION 1:

    1) has anyone got best practices to accept plsql RECORDS returned by a function?

    Here is an example.

    http://adfpractice-Fedor.blogspot.SG/2013/01/working-with-PLSQL-procedures-in-ADF-BC.html

    But it will be a lot of work... first of all accept the results in a loop... then store in a temporary storage can be a few VO or global temporary table and then display them on the page


    OPTION 2:

    Using the functions PIPLELINED and use in the select statement.  While I can use this select statement in the SQL query to create VO... and drag and drop the VO...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table PIPELINED;
    END my_pkg;


    select * from table(my_pkg.return_table);


    Wow... I'm so smart! .. really possible?  who is the best/possible/recommended option?

    I'm sure that will be the question most read by many who wants to use PLSQL instead of JAVA to the treatment and CHOSEN to use only to display the output of the PLSQL functions or procedures.


    Thank you

    Rahul


    Dario

    Do you mean the scope of the defined Type pkg will be finished?

    I created guy outside the pkg as 'Create Type' if it works in this case?

    Yes, level objects schema (created with "create or replace type...") can be used in java and this can work.

    I think that then the scope of this TYPE will remain until the user session passes.

    Object definitions is not worn, but have their bodies.

    So, if you instantiate the data level object type schema in a plsql function, scope of this object is this function.

    Of course, if you instantiate the object as a variable package, then life of this object is equal to the lifetime of the package (which usually equals life of session db).

    Dario

  • need help on image blob retriving of table... I need to use the function

    I have a single display field and I tried to retrieve a value using the function... The idea of using the BLOB comes from the following example...
    http://dgielis.blogspot.in/2008/07/show-blob-of-other-table-in-apex-form.html

    I created the following function... has only function display.
    "return ' < img src =" "|" APEX_UTIL. GET_BLOB_FILE_SRC('P375_PICTURE',1204,,'inline') | '" />';

    but the output is undesirable character
    The output is the following
    < img src = "" apex_util.get_blob_file? a = 231 & s = 16387884076007 & p = 375 & d = 26249204291254605 & i = 26247831247254566 & p_pk1 = 1204 & p_pk2 = & p_ck = C226897F204BFA329F601AF2ED72ECDA & p_content_disposition = inline "/ >"

    Using apex 4.2 db 11g release 2 xe
    1204 here are a few magazine_id
    Here's my blob table structure
    xxx_picture
    xxx_no number (10),
    BLOB of photo
    picture_filename
    picture_mimetype
    image_last_update
    I am able to recover the data via interactivereport but I will lke to recover their data that show only the BLOB field

    Can someone please guide. . I could hurt
    Thank you

    Published by: zycoz100 on April 28, 2013 01:05

    zycoz100 wrote:
    I have a single display field and I tried to retrieve a value using the function... The idea of using the BLOB comes from the following example...
    http://dgielis.blogspot.in/2008/07/show-blob-of-other-table-in-apex-form.html

    I created the following function... has only function display.
    return '';

    but the output is undesirable character
    The output is the following

    To get a displayed item to render in HTML, in the definition section Security value escape special characters notitem.

    For a column of the report, ensure that the column attribute text to display as report is report Standard column rather than the default display text (escape special characters).

    However in the APEX 4.x, using an element in the Image display and support declarative BLOB is preferable to these manual methods. Images can be formatted using the HTML attributes of the element form of property, or via CSS element.

  • Using the function to retrieve several data

    using the function recover data of the hre_date and name of entry where are employee_id = 100. kindly give a query in PLSQL

    Padma... wrote:
    Hello

    create or replace function f1 (a number, b out varchar2) return date
    is
    c the date;
    Start
    Select last_name, hire_date b, c of the employees where employee_id = a;
    return c;
    end;
    /
    declare
    name varchar2 (30);
    Start
    dbms_output.put_line (f1(100, name));
    dbms_output.put_line (Name);
    end;

    Thank you
    Padma...

    Agree with Marwim, using OUT parameters is very bad practice.

    Something would be more appropriate...

    SQL> create or replace function get_emp(empno in number) return sys_refcursor is
      2    rc sys_refcursor;
      3  begin
      4    open rc for 'select hiredate, ename from emp where empno = :1' using empno;
      5    return rc;
      6  end;
      7  /
    
    Function created.
    
    SQL> var rc refcursor;
    SQL> exec :rc := get_emp(7788);
    
    PL/SQL procedure successfully completed.
    
    SQL> print rc
    
    HIREDATE             ENAME
    -------------------- ----------
    19-APR-1987 00:00:00 SCOTT
    
    SQL>
    

    If the customer requires a Ref cursor returned with data, otherwise a registration type / adapted collection could be returned and the integrated data to the that, although in general the collection of data in memory and the passage on the procedures is not the most ideal because it takes up resources such as memory of the PGA.
    Without special requirements, it is impossible to give a precise answer.

  • using the function in pipeline

    Hello

    I defined a VC_ARRAY_1 as
    create or replace TYPE  "VC_ARRAY_1" as table of varchar2(4000)
    and the work that the test shows below:
    select * from table(VC_ARRAY_1('qqqq', pppp'))
    
    COLUMN_VALUE
    qqqq
    pppp
    But, when I use the function that
    select * from table (vc_array_1(select personkey from tbl_persons))
    I get an error ORA_00936 missing expression (the column personkey is a vrachar2 (4000)). What is the problem with the use of the second?

    Thank you
    Rose

    Elle rose says:
    What is the problem with the use of the second?

    Everything. You need to throw query results in collection type:

    select  *
      from  table(
                  cast(
                       multiset(
                                select  personkey
                                  from  tbl_persons
                               )
                       as vc_array_1
                      )
                 )
    /
    

    SY.
    P.S. and where is a function in pipeline in all this?

  • How to use the function @RETURN for poster messages Essbase in 11.1.2.1

    Hello

    I found the business support Essbase Hyperion Planning 11.1.2.1 @RETURN rule novelty.

    If I create a simple BR for planning app like below:
    "@RETURN ("test return message,"WARNING);
    Validation returns error and BR can not be deployed.

    One is how to use the function @RETURN br?

    Thank you!

    He probably should be in a calco for example block

    "Profit".
    (
    ....
    )

    It is more likely to be used with an IF ELSE command, you do not want to define the condition for the calculation, roughly what the feature is designed for output.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Is it Possible to use a function when you create a table?

    Hello

    Is it possible to use a function during the construction of a table?

    I would like to browse my data returned from the db and call a function. The part where I call the function "myFunction [i]" doesn't seem to work. How can I solve this problem? I need to put the function call results in the table.

    var i: uint;

    for (i = 0; i < dataArray.Length; i ++)

    {

    dgArray = [{name: dataArray [i] .name, Type: myFunction [i]}];

    }

    Thank you!
    -Laxmidi

    Hi laxmi,

    Yes of course it is quite possible to use a function when you create a table... In your code, you made some mistakes...

    You used hooks to call the function myFunction [i]... where you are supposed to use parentheses... myFunc (i)... and other you must push the object in the dgArray but yous hould not not attribute...

    dgArray = [{name: dataArray [i] .name, Type: myFunction [i]}]; This will result in only the last table iterates in dgArray...

    So you should write dgArray.push ({name: dataArray [i] .name, Type: (i) myFunction});

    Check out the code below...


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete ="init (); » >

      private var dgArray:Array = new Array();
    private var myDataArray:Array = [{data: '1', name: 'Robert'}, {data: '2', name: 'Nicolas'}, {data: '3', name: "Bika"}]
     
    private function init (): void
    {
    for (var i: int = 0; i
    {
    dgArray.push ({name: dataArray [i] .name, Type: (i) myFunction});
    }
    }
      
    private void myFunction(i:int):String
    {
    Return 'Type' + i;
    }
    ]]>

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • Return by using the function number

    How can I return number using the function.

    Here is my procedure but do not in the name of variable or setting up as a variable...

    create or replace function Calculate_number)
    Number 1 in number,
    Number2 number)
    Return number is
    Start
    declare
    number of result;

    Select number1 + number2 as a result of double;


    Return (result);
    end;

    Hello

    You have not need double a lot in PL/SQL.

    CREATE OR REPLACE FUNCTION Calculate_number
    (
         number1 IN NUMBER,
         number2 IN NUMBER
    )
    RETURN NUMBER
    DETERMINISTIC
    IS
           result number;
    BEGIN
         result := number1 + number2;
    
         RETURN Result;
    END      Calculate_number;
    

    Strored procedures, local variables are declared between statements IS and BEGIN. DECLARE in a stored procedure starts a nested block to BEGIN, with its own local variables, which is rarely necessary. (Nested BEGIN blocks are not so rare, but they almost never have local variables need a nested block. Most people here all variables of the function complete together before the first START.)

    If the function always returns the same value when it is called with the same arguments, then Deniz it as DETERMINISTIC; It might make it faster to use.

    There are many good reasons to use a variable as results, but if you don't happen to have one, then you can do this:

    CREATE OR REPLACE FUNCTION Calculate_number
    (
         number1 IN NUMBER,
         number2 IN NUMBER
    )
    RETURN NUMBER
    DETERMINISTIC
    IS
    BEGIN
         RETURN  number1 + number2;
    END      Calculate_number;
    

    Published by: Frank Kulash, October 22, 2010 12:37
    Fault corrected typo (thanks, HM); Added after the remarks.

    Published by: Frank Kulash, October 22, 2010 13:28

  • I want the single update query without using the function.

    I want to update sells_table selling_code field with product_code date product table max.
    In the product table, there are several product_code date wise.

    I did with below charly with the use of the service, but we can do in the query what a single update
    without using the function.

    UPDATE sells_table
    SET selling_code = MAXDATEPRODUCT (ctd_vpk_product_code)
    WHERE NVL(update_product_flag,0) = 0;

    (P_product IN VARCHAR2) RETURN of HVL.maxdateproduct NUMBER FUNCTION to CREATE or REPLACE
    IS
    max_date_product VARCHAR2 (100);
    BEGIN
    BEGIN
    SELECT NVL (TRIM (product_code), 0)
    IN max_date_product
    FROM (SELECT product_code, xref_end_dt)
    PRODUCT
    WHERE TO_NUMBER (p_product) = pr.item_id
    ORDER BY xref_end_dt DESC)
    WHERE ROWNUM = 1; -He'll be back a single line - max date product code
    EXCEPTION
    WHILE OTHERS
    THEN
    RETURN 0;
    END;

    RETURN max_date_product;

    END maxdateproduct;

    Thanks in advance.

    Hello

    Something like that.

    update setlls_table st
            set selling_code =(select nvl(trim(product_code)) from
                                  (select product_code
                                          , rank() over (partition by item_id order by xref_end_dt DESC) rn
                                       from product
                                   ) pr
                                   where rn =1
                                         and pr.item_id = st.ctd_vpk_product_code
                               ) where NVL(update_product_flag,0) = 0 ;
    

    That such is not tested due to lack of sampling input.

    Concerning
    Anurag Tibrewal.

  • Query using the functions, research and additions?

    I am new to SQL, databases, and APEX! I'm sure it's very easy for you all, but I've been racking me my brains for two days on it; time for experts.

    My simple request is:

    Select first_name. » '|| middle_name | » '|| last_name 'full name '.
    of name_table;

    The problem I have, is that each name above is in a foreign language (which I don't understand by the way!), but I have a table that has "English" translations for each name... so my question is how to replace my 'translanted' value in each case...

    to translate the values, I do a:

    Select translated_name
    of translated_table
    where orginal_name = FirstName (or middle_name or same last_name)
    and translation source = "Dictionary" (there may be 3-4 or four sources of translation for each name...)


    Looks like a 'feature' would be the best way to do it... After much googling, this is what I came up with (which obviously does not work!):

    create or replace function TRANS_NAME (v_original in varchar2)
    return varchar2
    is
    v_translated varchar2;
    Start
    Select translated_name from v_translated
    of translated_table
    where original_name = v_original
    source = "Dictionary".
    Return v_translated;
    end;

    I use the 'APEX' Explorer to create the function, for a few reasons:
    1 SQL more does not display the foreign language (shows just a buch of? s), the APEX SQL tool indicates that the original language!
    2. it gives immediate, if not cryptic, comments on syntax errors.

    FYI, I'm using Oracle 11 g on a Sun Solaris 10 Server.

    Appreciate any help you might be able to provide!

    create or replace function TRANS_NAME (v_original in varchar2)
    return varchar2
    is
    v_translated VARCHAR2 (255); -->> Add the LENGTH of your
    Start
    Select translated_name from v_translated
    of translated_table
    where original_name = v_original
    source = "Dictionary"; --->> AND A SEMICOLON HERE
    Return v_translated;
    end;

    Published by: hoek on May 15, 2009 16:21 bought some glasses and spotted the semicolon missing too

  • I have an iMac 27' 2012 with macOS Sierra and Apple Watch with watch OS 3, I can use the function "Log?" in Apple Watch

    I have an iMac 27' 2012 with macOS Sierra and Apple Watch with watch OS 3, I can use the function "Log?" in Apple Watch

    Hi John 2078 Tito.

    I understand that you have updated your iMac and Apple Watch and now you're curious about unlock your iMac using your Apple Watch. I know that it is a nice feature to be able to quickly and safely unlock your computer, so I'm happy to help you.

    This feature is available on 2013 iMacs and later versions, which means that your iMac won't be compatible. You can see more info on this feature here:
    Unlock your Mac with Apple Watch - Apple Watch user's Guide

    Thank you for using communities Support from Apple. See you soon!

  • I have been using the functionality of Firefox in which I could have multiple sets of tabs open, but only see the game I was working with. I have updated and now the functionality is Gone

    I have been using the functionality of Firefox in which I could have multiple sets of tabs open, but only see the game I was working with. I have updated and now the feature disappeared. I had a small icon on the top right of my toolbar. I used it all the time to keep windows separated for financial, plans to travel items, news, etc.. Has it been removed from Firefox?

    Hello

    The feature of tab groups is always present. You can try with the button right of the + after the last tab and Customize. If the icon is hidden behind the other, or if it is available inside the mini window customize, you can put it back. If the problem persists, you can also try of reset toolbars and controls: and start to make changes and restart in Safe Mode screen.

  • Using the functionality of Panorama on the DSC - H55

    What is the best technique to use the functionality of panorama Cybershot DSC - H55, press and hold down the button while slowly following the arrow or press and release the button? Move from L to R very slowly or quickly?

    HI, you have limited play with the speed as you move the camera a little to get used to the speed. I know it sounds strange, but it takes a little getting used to for you to know how fast to move it to. If you move too slow or too fast, you will not receive either the scene or the camera will tell you to slow down. If you can't move the camera through any matter within the time limit, a grey zone occurs in the composite image. In this case, go faster the camera to record a complete panoramic image.

    To take the panorama photo, you can press the button all the way down and release, then move the camera in the direction of the arrow. The camera records for about 7 seconds.

Maybe you are looking for

  • How to export info 'Medical ID' of iPhone 4S 'health' App, so I can save and print?

    How to export 'Medical ID' (medical history, medications, etc.) of iPhone 4S 'health' App, so I can save & print?  It is a way to recover when I back up my iPhone to iTunes back to top/iCloud back up/MacBook Air 2013 back up/iPad Mini 2?  Worse comes

  • ProLiant ML350 G6: How to add a new disk to my server

    I have a HP ProLiant ML350 G6 in the HDD rack before I have some unused slots and I want to fill them with some news readers. How do I do that? I do not have a "cage" where to put a standard 3.5 "drive, so I wonder if I need to buy the whole cage + r

  • Cannot move the photo from my computer to a CD. Why?

    In the past, I have moved my photos from my computer to a CD.  Now, he repeats to me that there is no CD in the drive.  But there are.  It is said in the 'Media' box 'fixed '.  Any ideas what the problem is and how can I fix?

  • Video of rocket

    Well, here's the deal. I have loaded Evan Almighty on my rocket using the Sansa Media Converter. Liked the film, and then... boom - locked. It remains frozen. I can stop it by holding the power button, but when I turn it on again, it is still blocked

  • How can I improve the graphics subscore for windows 7 64 bit?

    How can I improve graphics subscore for windows 7 64 bit the graphics is 5.0 and I used to improve, but how?   Original title: computer Preformance