Mathmatical function to return the value in injectors

Hello
I have obliged. If value for ex Lake 4400000, he should return as 4.4millions even for billions.
is there an oracle function to return the value in this format. ???

Hello

When I want to have a "readable" released in large numbers, I use to do the following:

Scott@my11g SQL>with t as (
  2  select 3456123456 n from dual
  3  union all select 4567123 from dual
  4  union all select 123465 from dual
  5  )
  6  select n, case when n>1000000000 then trunc(n/1000000000,1)||' Billions'
  7  when n>1000000 then trunc(n/1000000,1)||' Millions'
  8  else to_char(n) end fmtn
  9  from t ;

         N FMTN
---------- -------------------------------------------------
3456123456 3.4 Billions
   4567123 4.5 Millions
    123465 123465

------
* + [change] + *.
Moreover, lakh [url http://en.wikipedia.org/wiki/Lakh] has no meaning outside of South Asia.
Especially for a French man like me, grown with [url http://en.wikipedia.org/wiki/International_System_of_Units] International system of units that is fighting against what I call "funky" measures empirical such miles, yards, feet, inches, just not multiple of 10³
Same billion mean differ depending on the country (see [url http://en.wikipedia.org/wiki/Long_and_short_scales] long and short scales)

Just for "fun": [url http://articles.cnn.com/1999-09-30/tech/9909_30_mars.metric.02_1_climate-orbiter-spacecraft-team-metric-system?_s=PM:TECH] this is what can happen when we do not use the same system of units.

Tags: Database

Similar Questions

  • Need help with the function MAX Returns the values

    I am creating a report to return slow movement inventory data. One of the requests is that it return only the last date that an item is traded on. A map shows the last date of receipt for a part, the other will show the last time, a part has been issued or shipped on a sales order.

    The hiccup is that it returns every single of the last time that an item has been received, so every last show of the material (on the second sheet) of items on-site.

    Could someone help me set the max value? As shown below, and many variations, the sheet comes up with no corrupt data or dates.

    MAX (Date of the MAX operation) (PARTITION OF matter Transactions.Item matter Transactions.Item ORDER)

    Always returns the next two when in reality, I want just the one with the date the most recent (April 2010).

    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AB01D...     Problem of component WIP $0.00 11-Sep-2009-3
    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AD01D...     Problem of component WIP $0.00 April 13, 2010-16

    Thank you for your help.

    Becka

    Hi Becka
    If you have a new calculated column showng, as in your example, 13 April 10, and you have another column that contains also this date, you should be able to create a new condition. Condition that must be the date calculated max is equal to the actual date, thus returning only the line that includes 13 April 10.

    I hope I'm makng sense

    Best wishes
    Michael

  • Confidence for app.newDoc function always returns the undefined value

    Hello

    I'm doing a script activated by button.  Its purpose is to save a copy of the first page (form data erasure) in its own file in the same path as the open document.  As part of that I had to create a trust to cover the privileges of the app.newDoc function.  I have the following:

    trustedNewDoc = app.trustedFunction (function (nWidth, nHeight)

    {

    app.beginPriv ();

    app.newDoc (nWidth, nHeight);

    app.endPriv ();

    });

    This was recorded in a file called "newdoc.js" in the "app" of javascript.  I closed my Acrobat Pro XI and restarted.  As soon as I try to activate a button with just: "myDoc = trustedNewDoc var (500,500);", it opens the document as specified, but I get "undefined" returned to myDoc - that avoids manipulation of the Fryer.

    If I run the same line of the console, it also returns the value undefined.  Running "myDoc = var app.newDoc ();" also returns undefined, but just "app.newDoc ()"; only returns '[Doc]' - even if ' trustedNewDoc (500,500); "alone is still undefined.

    In any case, I feel like I'm missing something fundamental, even if I found some guides suggesting to do exactly what I have it implemented.  I am pretty sure I have everything entered correctly and followed all the steps, so at this point I'm stumped.  Any help would be greatly appreciated!

    Thank you

    Mike

    Thanks Gilad, that was exactly what he needed!  And thanks for getting back to me so quickly.  Now, I really wish I would have asked this question more early yesterday after spending hours trying to find a solution.

    Unfortunately there aren't really examples I found where a value was returned.  Maybe it's the good sense and I should have better, but I thought that the value has been returned by other means.  In any case, it's great to work with your help!  Now, I have a separate question, with what I need to see if I can get help. Hey, great work and thank you again!

  • function to_numer returns the error in pl/sql

    Hello
    I don't have a prob when executing select double to_number('1234.56'), the numer contains decimal numbers
    But this stm return number not valid error in the procedure, except if I use to_number('1234.56','9999999.99')
    Please help me.
    I need to set parameter in DB?
    BTW: my NLS_NUMERIC_CHARACTER has the value '.,'
    Thank you.

    function to_numer returns the error in pl/sql

    hlthanh wrote:
    Hello
    I don't have a prob when executing select double to_number('1234.56'), the numer contains decimal numbers
    But this stm return number not valid error in the procedure, except if I use to_number('1234.56','9999999.99')
    Please help me.
    I need to set parameter in DB?
    BTW: my NLS_NUMERIC_CHARACTER has the value '.,'
    Thank you.

    Handle: hlthanh
    Status level: Beginner
    Join date: March 7, 1999
    Messages total: 94
    Total Questions: 60 (38 pending)
    many questions and so few answers.
    How SAD!

  • How to perform a function and return the result in a variable of liaison

    Hello

    I'm trying to calculate the sum of the salaries of all persons with a particular using a function JOB_ID TOTAL_INCOME (v_job_id).

    create or replace function total_income
    + (v_job_id in VARCHAR2) +.
    Number IS BACK
    v_total number (6);

    cursor get_sal is
    Select the pay of employees
    where job_id = v_job_id;
    BEGIN
    v_total: = 0;
    for emp in get_sal
    loop
    v_total: = v_total emp.salary; +.
    end loop;

    dbms_output.put_line (' Total salary ' | v_job_id |' is: ' | v_total);
    Return v_total;
    END;

    Now I woud like to perform this function and assign the value returned in a variable binding test_sal

    test_sal variable number (6)
    SELECT total_income ('AD_VP') in: test_sal FROM DUAL;
    dbms_output.put_line (' Sal Total :'||: test_sal);

    This returns the errors below:

    SELECT total_income ('AD_VP') in: test_sal FROM DUAL
    *+
    Error on line 0
    ORA-01036: illegal variable name/number

    dbms_output.put_line (' Sal Total :'||: test_sal);
    Error on line 3
    ORA-00900: invalid SQL statement

    Could someone help me what could be the problem? Thanks for your time...

    Hi Kiran and welcome to the forum,

    You mix SQL and PL/SQL

    It's the way in which SQL:

    SQL> SELECT total_income('AD_VP') FROM DUAL;
    
    TOTAL_INCOME('AD_VP')
    ---------------------
                      123
    1 row selected.
    

    It comes to PL/SQL in SQL * more

    SQL> variable test_sal number
    SQL> execute :test_sal := total_income('AD_VP')
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line('Total Sal:'||:test_sal)
    Total Sal:123
    PL/SQL procedure successfully completed
    

    Concerning
    Peter

  • Do stuff to PL/SQl that returns the value and redirect to modal page by setting this value

    Hello

    a button click Page1 I would perform a PL/SQL procedure that returns a value in P1_ITEMVAL and then redirect to a page 2 (modal page) and the value of an item on this page with the value previously returned. To do the same thing with a normal page is quite easy:

    Button action is present, then process of PL/SQL that returns the value in the P1_ITEMVAL element and, finally, a branch at page 2 that sets P2_ITEMVAL with P1_ITEMVAL. I really have no idea how to do the same thing when the target is a modal page.

    I created a unit test on https://apex.oracle.com/pls/apex (application 1554 - redir_to_modal)

    Workspace: tests

    USER: supporter

    PWD: supporter1234

    Any help would be much appreciated.

    Kind regards

    Pavel

    Pavel

    If you prepare a URL using the value calculated in the PLSQL of DA part you can then use a subsequent stage of javascript to set the location of the window.

    This will jump to the top of the page of the modal dialog box

    : P1_URL: = apex_util.prepare_url)

    ' f ? p ='|| : APP_ID - Application id

    |': 2' - Page id

    ||': ' || : APP_SESSION - Session id

    ||':'                      -- Request

    ||':NO'                    -- Debug

    : ': ' - Clear Cache

    : ': ' - Settings

    ||' P2_ITEMVAL'

    : ': ' - Parameter values

    || (: P1_ITEMVAL);

    then in the action of javascript

    Window.Location.Replace ($v ('P1_URL'));

    Hope this is of some use

    Concerning

    Kelvin

  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

    --------------------------

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

    --------- ---------- ----------- ---------- ----------- ---------- -----------

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • fatal error when installing master collection '[FATAL] installation - installation package error C:\Users\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx. Returns the value of pim_installPackage = - 1

    Hello

    When I try to install a trial like photoshop cs6 or master collection cs6 product, I get the error "Installer has not initialized. I used Adobe cleaner to remove all products cs6 and tried again, but no luck, same error.

    I opened the log file and find this line:

    [FATAL] Setup error - installation package C:\Users\moshe-a\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx.

    Returns the value of pim_installPackage = - 1

    No idea how to fix?

    Thank you, Momu

    start at the top and work your way down to apply applicable patches until your problem is solved.

    If (win) cc: https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html

    If your error is:

    "Setup failed to initialize. File not found. ' or 'could not initialize installation. This could be due to missing files.

    first of all, rename folder OOBE OOBE.old.

    to find the OOBE:

    Win 64 bit OS: Program Files x86\Common Files\Adobe\OOBE

    Win 32 bit OS: Program Files \Common Files\Adobe\OOBE

    Mac os: HD > library > application support of > adobe > caps

    Mac os: USER > library > application support of > adobe > OOB

    If it fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.

    If you use an installation dvd:

    Copy the contents of the drive in a desktop folder and install from this directory.

    If you are using a mac:

    1. try to create a new user account in Mac with administrator privileges.

    2. connect to the new user, navigate to Mac HD > Application > utilities > Adobe Installer folder, locate products such as Adobe Reader, Adobe Flash, Adobe Air and uninstall the

    3. navigate to the user library > Application Support > Adobe and Adobe put in the trash.

    4. navigate to Mac HD > library > Application Support > Adobe and Adobe put in the trash.

    5 restart the installation.

    If everything is applicable above fails, check your Setup logs:

    http://helpx.Adobe.com/Photoshop-elements/KB/troubleshoot-install-using-logs-elements.html

  • XML - ORA-19025: EXTRACTVALUE returns the value of a single node

    Hello

    I'm new to XML DB. Can someone help me with the below XML

    I use the following XML... (I pasted a part only of it coz I need data only up to this article)

    XML
    --------------------

    <? XML version = "1.0" encoding = "UTF-8"? > < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-."
    example"container ="http://www.w3.org/2001/XMLSchema"> < SOAP - ENV:Body >
    < ns:PicklistWS_GetPicklistValues_Output xmlns:ns = "urn: crmondemand/ws/list dropdown /" >
    < ListOfParentPicklistValue xmlns = "urn: / xml/crmondemand/list of choices" >
    < ParentPicklistValue >
    < language > ENU < / language >
    < ParentFieldName > plProduct_Team < / ParentFieldName >
    < ParentDisplayValue > Marketing On Demand < / ParentDisplayValue >
    < ParentCode > Marketing On Demand < / ParentCode >
    < Disabled > N < / disabled >
    < ListOfPicklistValue >
    < PicklistValue >
    Escalation of OCP/SME < code > < code >
    Escalation of OCP/SME < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >
    < PicklistValue >
    Ask fusion < code > < code >
    Merge request < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >



    Code
    ---------




    SELECT distinct
    EXTRACTVALUE (value (SR), ' / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code ','xmlns = "urn: / crmondemand/xml/list of choices"') AS display.
    Return EXTRACTVALUE (value (SR),'/ ParentPicklistValue/ListOfPicklistValue/PicklistValue/DisplayValue ',' xmlns = "urn: / crmondemand/XML/picklist"'),.
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentDisplayValue','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_display,
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentCode','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_return
    TABLE (XMLSEQUENCE ((EXCERPT)
    WEB_SERVICE (' <? xml version = "1.0" encoding = "UTF - 8" standalone = "no"? > < envelope soap: xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/")
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < soap: Body >
    < PicklistWS_GetPicklistValues_Input xmlns = "urn: crmondemand/ws/list dropdown /" >
    Type < FieldName > < / FieldName >
    Service request < RecordType > < / RecordType >
    < / PicklistWS_GetPicklistValues_Input >
    < / soap: Body >
    "< / envelope soap: >.
    (' document / urn: crmondemand/ws/list dropdown /: ' GetPicklistValues, Id_de_la_session).
    "/: soap envelope / soap: Body / * / * / * ',' xmlns:soap ="(http://schemas.xmlsoap.org/soap/envelope/'))) SR "


    ERROR
    ---------

    ORA-19025: EXTRACTVALUE returns the value of a single node


    UNDERSTANDING
    ---------------------------

    As my Xpath only points until the node - ParentPicklistValue and not the child nodes under it. That's why, when I try to interview the child nodes - / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code, I get the error mentioned above.

    REQUIREMENT
    -----------------------

    Can someone help me to receive the values of the mother and child values based on xml and query above.

    Hello

    It's a classic ;)

    You need a second XMLSequence who shreds the collection of PicklistValue in relational lines:

    select extractvalue(value(sr2), '/PicklistValue/Code', 'xmlns="urn:/crmondemand/xml/picklist"') AS Display
         , extractvalue(value(sr2), '/PicklistValue/DisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS Return
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentDisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_display
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentCode', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    from table(
           xmlsequence(
             extract( WEB_SERVICE( ... )
                    , '/soap:Envelope/soap:Body/ns:PicklistWS_GetPicklistValues_Output/ListOfParentPicklistValue/ParentPicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"
                       xmlns:ns="urn:crmondemand/ws/picklist/"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' )
           )
         ) sr1
       , table(
           xmlsequence(
             extract( value(sr1)
                    , '/ParentPicklistValue/ListOfPicklistValue/PicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"' )
           )
         ) sr2
    ;
    

    What is your version of the database BTW?
    10.2 and upward, you can use the XMLTable.

  • How to return the value 0 for no data using the County?

    Hi all
    I used this query to count the number of records for each month of the year:

    SELECT DISTINCT COUNT (I.information_sid) COUNT, TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM') MONTH

    INFORMATION I

    TO_DATE GROUP (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    ORDER BY TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    But this code returns no value for months without data
    I want to return the value '0' for any month of data. How, please?

    Note: I use reports 6i.

    Maybe this?

    SELECT SUM(CNT_REC) CNT_REC, MONTH
    FROM
    (
    SELECT COUNT(I.information_sid) CNT_REC, TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM') MONTH
    FROM INFORMATIONS I
    GROUP BY TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM')
    UNION ALL
    SELECT 0, LPAD(ROWNUM,2,0)
    FROM ALL_OBJECTS
    WHERE ROWNUM <= 12
    )
    GROUP BY MONTH
    ORDER BY MONTH
    

    No need to SEPARATE during the use of GROUP BY.

    -Clément

  • Function that return the name of the current report

    Hello

    Anyone know if there is a function that returns the name of the current report?, similar to GET_APPLICATION_PROPERTY (CURRENT_FORM) in the forms.


    Tnks,


    LEFM

    Hello

    You can use the builtin: SRW. GET_REPORT_NAME
    This function returns the file name of the running report

    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_get_report_name.htm

    NOTE: it is not the name of the RDF file. Is the name defined in the reporting name property.

    Concerning

  • DICOM metadata - extractvalue returns the value of a single node

    Hello

    I have difficulties in getting the value of the objects with repeated elements. Specifically, I need to get the value of spacing of pixels in the following excerpt from xml.
    <DICOM_OBJECT>
    ..
         <DECIMAL_STRING tag="00181063" definer="DICOM" name="Frame Time" offset="900" length="2">0.0</DECIMAL_STRING>
         <CODE_STRING tag="0018106A" definer="DICOM" name="Synchronization Trigger" offset="910" length="10">NO TRIGGER</CODE_STRING>
    ..
         <DECIMAL_STRING tag="00280030" definer="DICOM" name="Pixel Spacing" offset="1660" length="22">0.003562</DECIMAL_STRING>
         <DECIMAL_STRING tag="00280030" definer="DICOM" name="Pixel Spacing" offset="1660" length="22">0.003562</DECIMAL_STRING>
         <UNSIGNED_SHORT tag="00280100" definer="DICOM" name="Bits Allocated" offset="1690" length="2">8</UNSIGNED_SHORT>
        <UNSIGNED_SHORT tag="00280101" definer="DICOM" name="Bits Stored" offset="1700" length="2">8</UNSIGNED_SHORT>
    ..
    </DICOM_OBJECT>
    Normally, I use the following query to get the value of spacing of pixels:
     select EXTRACTVALUE(t.dicom.metadata
                          ,'/DICOM_OBJECT/*[@name="Pixel Spacing"]'
                         ,'xmlns=http://xmlns.oracle.com/ord/dicom/metadata_1_0')  scale_factor
       from my_dicom_object t
    It works, but not when there are two elements. Then I get the error: "ORA-19025: EXTRACTVALUE returns the value of a single node.


    All I really need is to get the value of the first node with the name of "spacing of pixels. Despite the many examples available to do with traditional xml paths, I was unable to find an example that makes using XPATH search strings rather than direct tag structure.

    Can someone give an example?

    Thank you!

    Published by: rcdev on August 10, 2009 15:20

    All I really need is to get the value of the first node with the name of "spacing of pixels.

    This? :

    select EXTRACTVALUE(t.dicom.metadata
                          ,'/DICOM_OBJECT/*[@name="Pixel Spacing"][1]'
                         ,'xmlns=http://xmlns.oracle.com/ord/dicom/metadata_1_0')  scale_factor
       from my_dicom_object t
    
  • Looking for an example of "function that returns the error text.

    Environment: APEX 3.1.1.00.09 on AIX 5.3

    I'm looking for an example implementation of the posting of the "function that returns the error text.

    I would like to write a database function that does the validation logic and return the text of the error.

    Is it possible to create multiple lines of text of error based on error conditions?

    I'm trying to use it at the end of the input data to go on the set of the 'document' to the entry and highlight all error conditions encountered before the 'document' is subject to additional processing.

    I wrote the function and reference it in a posting as ' validate_stuff (: P3_DOC_SEQ); »

    I have an error message "validate_stuff is not a procedure or is not defined.

    The object is a function, not a procedure. It is defined to return a parameter VARCHAR2 hoped posting if it is not NULL.

    When I run the SQL function * more and spend in a number of documents are returned the correct error messages.

    Any direction is greatly appreciated.

    -gary

    Hi Gary,.

    You must RETURN the result of the function:

    BEGIN
     RETURN validate_stuff(:P3_DOC_SEQ);
    END;
    

    Andy

  • How to get the query of the region "PL/SQL function body returns the query string"?

    Hello

    is it possible to get the query string from the region of type "PL/SQL function body returns the query string"?

    I can get the definition of the region as a PL/SQL procedure, but I am interested in the returned query. I tried to write something like

    < pre > v_return_query: = «...» » ;
    : P49_QUERY: = v_return_query;
    Return v_return_query; < / pre >

    to save the return on hidden item P49_QUERY string, but it does not work. I get the error message: ERR-1002 cannot find the item for the "P49_QUERY" element ID in the application '4000 '.

    Kind regards
    Przemek

    If you need to make reference to a page element in the block then you can use this type of control to avoid having to use generic column names:

    if apex_application.get_current_flow_sgid(:APP_ID) = apex_application.get_sgid then-- runtime  :P9_SQL := vSQL;else-- design time  null;end if;
    

    But if all you want to do is capture the SQL debugging you can take all the references element in the block and use the insert statement (in a debug table) as I showed earlier.

    Scott

  • You must return the value of the Oracle function in VB Code

    Hi all

    I have the oracle APPTIDFUN (WHO RETURN NUMBER) function, I need to call in the VB Code. (Here's the code)

    --------------------------------
    If Msg2 = 6 Then
    Dim RS As New ADODB. Recordset
    Dim SQL As String
    RS. Open "appointments", CN, adOpenDynamic, adLockPessimistic
    RS. Find ' patient_id = ' "& str1 &" "'". "
    If RS. When the EOF
    RS. Find ' Appt_start_Date = ' "& str3 &" "'". "
    If RS. When the EOF
    RS. AddNew
    RS ("patient_id") = str1
    RS ("Appt_type") = str2
    RS ("Appt_start_Date") = str3
    RS ("Appt_end_date") = str4
    RS ("Num_days") = str5
    RS ("Total_Amount") = str6
    RS ("Inv_Number") = str7
    RS ("Approval_status") = str8
    RS ("NUM_WATCHER") = str9
    RS. Update

    ------------------------------------------------------------
    I want to call the function from oracle here that in the above code

    RS ("Appt_id") = < value of function >


    Please do the needful.

    Abdul,

    You need to change the line

    RS("Appt_Id") = RS1
    

    TO

    RS("Appt_Id") = RS1(0)
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

Maybe you are looking for