TO_CHAR FUNCTION IN ORACLE FORM

HI,
Table called A has column name col1
col1
12563.563
52685.563
05263.540
I would like to use SUBSTR(col1,2,6) for insert values from A table to B table by Oracle form and following values are inserted in B table
2563.5
2685.5
263.4
If I use SQLPLUS it is inserting as my requirement like
2563.5
2685.5
5263.4
Third row should be 5263.5 instead of 263.4. In Oracle form may have internal coversion function to convert character value to number values, I do not want to convert the value to number. Both table columns are varchar2 column.
What is the equal to_char function in Oracle form. If it is NLS_NUMERIC_CHARACTERS, please what are the parameters to be passed along with column.
Thanks in advance
Saravanan.

Hello,
If you don't want to take account any calculation on the decimal part, you could consider the Trunc() function instead of the To_Char():
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select to_char(52685.563,'00000000.0'), trunc(52685.563,1) from dual
  2  /
TO_CHAR(526 TRUNC(52685.563,1)
00052685.6            52685.5
SQL> Francois

Similar Messages

  • How to call java function in Oracle forms?

    Hi I am having Oracle 9i with 10g Developer Suite.
    I am new to Oracle forms..
    I had one function in java getDatas()..
    How can I call this function in Oracle Forms..
    Pls help
    Thanks

    Thanks Francois,
    I want to display values from my java code in the Forms..
    For that purpose only i am installing 10g Developer Suite..
    The below is java code..
    public class DBTest {
              public static String callDB(int id,String name){
              String ss="Hai";
              Connection con=null;
              try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("url","id","pwd");
                   Statement st=con.createStatement();
                   System.out.println("Connected...");
              int r=st.executeUpdate("Insert into FORM_TEST VALUES('"+id+"','"+name+"')");
                   if(r==1){
                        ss="Inserted Sucessfully";
                   else{
                        ss="Insertion Failed";
              }catch(final Exception e){
              System.out.println(e);
              return ss;
         public static void main(String[] args) {
              int empid=102;
              String empname="Gilbert";
              String resultStr=callDB(empid,empname);
              System.out.println(resultStr);
    I want to dispaly Inserted or Insertion Failed in Oracle Forms..
    As per Gerd Volberg suggestion, i had placed DBTest.jar in
    E:\DevSuite\forms\java\DBTest.jar
    and in formsweb.cfg the below jar is added..
    archive_jini=frmall_jinit.jar,DBTest.jar
    But in Fomrs Builder-->Program-->Import Java Classes-->Oracle
    org,ice,com and subnodes are available.
    But my jar is not available..
    Is my way is coorect?
    Pls provide soln..
    Thanks

  • Grid Functionality in Oracle Forms

    Hi All,
    This is regarding Grid Functionality in Oracle Forms 6i. Do we have Grids concept in Oracle Forms? If yes please explain me about creating Grids in Forms?..And If anyone has any document related to this topic please provide it to me..Even I searched in oracle Portal, Oracle Forums and metalink as well but could not locate any relavent documents on it....... It would be a great help if you provide information on the same.
    Thanks in Advance.

    hello ,
    just open data block property set property "number of record displayed=10"
    so u can see 10 records at time like grid in vb or .net
    u can navigate record using up/down key.
    it's not a grid but mulit record data block.
    Regards
    Chandan

  • Calling a pl/sql function from oracle forms

    I have written a pl/sql function in a package.
    package name- sup
    function name - func
    I have written a when-button-pressed trigger .from here I want to call this function.
    How can I do that?
    Please help..

    Thanks a lot..
    User may select 20-30 check boxes for respective name & id...then at the end , user will hit OK...from here when-button-click will call a procedure....that will update/insert/delete a table data.The procedure I have written is:-
    DECLARE
    N_CNT Number(1);
    D_SYSDATE Constant date :=sysdate;
    Begin
    select count(1)
    into N_CNT
    from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    if ((N_CNT = 0) and (:LANDLISTE.state = 'A')) then
    insert into dbtable
    LAND_ID,
    STATE,
    suppl_prof_id,
    suppl_id,
    OPERATOER_ID,
    SIDST_OPD_DATO,
    SIDST_OPD_INIT
    values
    :BLK1.LAND_ID,
    'Y',
    :BLK1.suppl_prof_id,
    :BLK1.suppl_id,
    :BLK1.Operatoer_id,
    D_SYSDATE,
    :BLK1.SIDST_OPD_INIT
    elseif
    ((N_CNT>0 )and (:LANDLISTE.state = 'A')) then
    update dbtable L
    set L.SIDST_OPD_DATO = D_SYSDATE,
    L.SIDST_OPD_INIT = :BLK1.SIDST_OPD_INIT
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    elseif ((N_CNT>0 ) and (:LANDLISTE.state = 'D')) then
    delete from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    end if;
    end;
    Will it be able to load multiple data(20-30 at a time) to the table?
    Should I write anything to commit the data in the table?
    I am very new to oracle forms...please help..

  • How to call userdefined java script function in Oracle Forms 11g.

    Hi,
    I Created a java script contain a function, that will open and close the browser for some URL.
    CODE:-(webclose.jp)
    *function manageWindows() {*
    var windows = [], i = 0;
    var url =  "htttp://oracle:64578/xmlpserver/login.jsp?Go&id=admin&passwd=admini";
    *if (url.length) {*
    *windows[i] = window.open(url, ' tabWindow_'+i);*
    i++;
    *winows[i-1].close();*
    *delete windows[i-1];*
    return false;
    *}* Then i placed the javascript file in path <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\_WL_user\formsapp_11.1.1\e18uoi\war\
    After that i called the javascript function in to forms as
    WEB.JAVASCRIPT_EVAL_EXPR('webclose.manageWindows();');
    When running the form it showing error
    FRM-92190: JavaScript is unable to evaluate expression.
    If anybody knows pls help me.

    Always post code snippets in &#123;code&#125; tags as explained in the FAQ.
    I Created a java script contain a function, that will open and close the browser for some URL.
    CODE:-(webclose.jp)
    function manageWindows() {
    var windows = [], i = 0;
    var url = "htttp://oracle:64578/xmlpserver/login.jsp?Go&id=admin&passwd=admini";
    if (url.length) {
    windows = window.open(url, ' tabWindow_'+i);
    i++;
    winows[i-1].close();
    delete windows[i-1];
    return false;
    } Then i placed the javascript file in path <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\_WL_user\formsapp_11.1.1\e18uoi\war\
    After that i called the javascript function in to forms as
    WEB.JAVASCRIPT_EVAL_EXPR('webclose.manageWindows();');
    When running the form it showing error
    FRM-92190: JavaScript is unable to evaluate expression.
    If anybody knows pls help me.>
    This error has nothing to do with Forms, it is an JavaScript error.
    Most likely cause is this line
    if (url.length) {url.length returns a Whole number and so the conditions would be
    if (url.length > 0) {Or
    if (url) {  // not null checkCheers,

  • How I can use use_exit function in oracle forms

    Hi,
    I will appreacite if Somebody can help me , how I can configure the user_exit function for our Oracle Forms 10g development environment (Windows 32 ).
    With regards
    Satheesh Kumar

    hi,
    in order to find out the user exits for any tcode,
    1. get the developement class of the tcode from SE93.
    2. Now goto transaction SMOD and press F4,
    3. give in the Deve class in the dev class and Press ENTER
    this will show u the exits for any tcode.
    or execute this report
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    Regards
    Anver

  • Attachment function using oracle form?

    Hi guys,
    I am developing a logistic system using oracle forms, how can I attach a document to the shipment function?
    Anyone has experience on attaching a document on oracle form? Any table structure required?
    FAN

    user623471 wrote:
    Hi guys,
    I am developing a logistic system using oracle forms, how can I attach a document to the shipment function?
    Anyone has experience on attaching a document on oracle form? Any table structure required?
    FANHow would you like your document to be attached??? What is the nature of your Document??
    If it's the records of another form like an invoice already typed in in your application, you can simply add a field that holds the ID/Number/Reference of your document, and have a button that drills down the data for you.
    If it's a scanned document you can use an image item, and display the document in an that item in your forms.
    Tony
    Alternative for images you can use BLOBs and other types of systemfiles
    Edited by: Tony Garabedian on Sep 2, 2008 10:19 AM

  • Auto Step functionality in Oracle Forms?

    Hello,
    I am testing Captivate for possibility to capture test
    scenarios for testing in Oracle. I know Captivate has the ability
    to create auto steps from Internet Explorer to automatically create
    captions that contain text describing your actions.
    Is this functionality available in Oracle Forms? I have
    tested it many times and Captivate seems to only be able to create
    auto steps from the browser and not create any from Oracle. It
    still captures everything properly, but not the auto steps. We are
    planning on printing these steps for ease of the user, and thus
    would like to have the steps in writing as well.
    This is what the Captivate Help file says about Auto Text:
    "Use the AutoText Captions feature to automatically create captions
    that contain text describing your actions. Customize the
    appearance, size, orientation, position, and display speed of
    captions, including font, size, color, and text formatting. Before
    recording, choose the caption type and language, or create and
    import your own caption style. Adobe Captivate 3 generates caption
    text in many languages."
    Thanks a lot.
    -Zeb

    Welcome to our community, Zeb
    At first, you really bowled me a wobbly with the description
    of "auto step functionality".
    It's been my experience that Captivate's ability to properly
    recognize elements of an application are pretty much hit and miss.
    To be honest, I'm surprised that it does as well as it does. But
    that's with normal desktop applications. Toss in something that's
    browser based (as your situation seems to be) and I'm surprised it
    works at all.
    I'm sort of stabbing in the dark here, as I'm not an
    application programmer. But I'd guess that what is happening is
    Captivate is only sensing an object in the browser and it has no
    idea as to how to interpret the fields and whatnot that make up the
    object.
    I know it's a nice feature when it works. However, I do hope
    you are aware that you aren't limited to what Captivate gives you
    with this. You are totally able to insert your own Text Captions at
    any time on any slide by clicking Insert > Text Caption.
    Cheers... Rick

  • Using SYS_EXTRACT_UTC function in Oracle forms version 9

    Hi,
    I would like to use the function SYS_EXTRACT_UTC in forms but I get an error 201:
    identifier 'SYS_EXTRACT_UTC' must be declared.
    How can I use this function? do I need any library or something?
    Thanks

    You can try creating a wrapper database procedure for this and call the procedure
    from forms. It should work
    Rajesh

  • Cancel/Break Stored PL/SQL-Procedure/Function from Oracle Forms

    Hello !
    If i call in Oracle Forms a PL/SQL-Programm stored in the dabase is there a way to break/cancel this programm from Oracle Forms ?
    Thanks in advance !
    Thomas

    <p>All I want to say is, you need to "prepare" the PL/SQL code to accept interruption, like dealing with the DBMS_APLICATION_INFO</p>If this code is not present in your PL/SQL code you won't stop it, except killing the session (that is a really dangerous option).
    Francois

  • How to use DLL function in Oracle Forms 5.0?

    for instance, the FindWindowA function in "user32.dll"
    please advise, thanks

    Take a look at ORA_FFI package.

  • Scroll functionality Oracle forms 6i

    Is possible to have scroll functionality in Oracle forms 6i.
    I searched , but iam getting only posts pointing to install external freewares like
    FREEWHEEL.exe to have the scroll functionality
    is it possible to configure any existing functionality , So by using the mouse wheel we
    could scroll a multiple record block
    Kindly help me in this regard

    Hi Kanish,
    I have a scrollbar fixed in a canvas, when Iam moving my mouse wheel button on my mouse , the scroll bar does not move automatically.Instead I have to move the scroll bar up and down to navigate through the records.
    When I tried to searching in the internet , I found that when we install a freeware called freewheel.exe. the scroll bar automatically moves when we move the mouse wheel button.
    Iam currently using Oracle forms 6i

  • Decimal Point Validation in Oracle Forms 6i

    One of my table has a column named interest. Data type of this column is number (4,1) so it can hold 99.9 and 100 both.
    If user enters 9.99, oracle form accepts the values and rounds it to 10. When scale defined for this data type is 1 so user shouldn’t be allowed entering 2 digits after decimal.
    I would like oracle to give error stating that user can enter upto 1 decimal place only so 9.99 is invalid input. Is there any function in oracle form (D2k)that let you know how many digits user has entered after decimal?
    Is there any function in oracle form (D2k) that let you know the length of input ?

    Hi
    Why don't u use Format mask property for the same,so it will not allow user for wrong i/p
    alternatively use forms message to display pop-up .
    Rgds
    NP

  • C# DLL Calls in Oracle Forms 6i

    Dear all,
    I want to call a C# ( C Sharp) functions in Oracle Forms 6i , How it is possible , If any body knows give me a suggestion...
    C# Codes
    using System;
    using System.Collections.Generic;
    using System.Text;
    namespace MathFunctions
    public class AddClass
    public static int Add(int a, int b)
    return (a + b);
    same codes I want to call using Oracle Forms 6i . ... ( AddClass.Add(10,20) ) value should return 30.
    C# Developer created the DLL file and given to me , I am not able to attach the DLL , anybody interest I can send the DLL through E-mail ,
    Regards,
    Veera.
    [email protected]

    The Forms Builder Help is the best source of information. It has plenty of examples too, like this one I copied from the Help:
    /* Find foreign library handle for
       a given library name */
    BEGIN
       libhandle := ora_ffi.find_library
                ('mylib.dll');
    END;

  • Need help in to_char function

    Hi All,
    I'm using below sql query to get sysdate with time stamp.
    select to_char(sysdate,'YYYYMMDD HH24:MM:SS') from dual
    This gives me below result:  20130816 05:08:49
    Strangely, when I keep on running the same query, I notice after 60 seconds are complete, time stamp starts with  20130816 05:08:01 again.
    Am i missing something here..
    Thanks in advance

    Karthick_Arp wrote:
    Keep a simple thing in mind. Date stored in the DB does not have any format. Format need to be applied while you display. The default date format is specified by the NLS_DATE_FORMAT parameter. You have used TO_CHAR to display date in a specific format. But the problem is that you have converted DATE into string. So if its just for display purpose then set the NLS_DATE_FORMAT, do not use TO_CHAR.
    With respect to your issue You need to represent Minute as MI. You have represented it as MM (Month) That's why you see 08 always.
    " the problem is that you have converted DATE into string"
    No, the problem was that he was explicitly using an incorrect format mask, specifying months where he should have specified minutes.
    The problem inherently cannot be the result of converting a DATE into a string.  Dates are always converted to strings for presentation, either implicitly by using the controlling setting of NLS_DATE_FORMAT (which can be set at several levels) or explicitly by using the to_char function.  Oracle will always convert.  It has to.  Internally, a date is binary gibberish.  But computer screens and printers can only show strings of characters, so the DATE will be converted to a character string, by hook or by crook.  And the method of oracle making that conversion is exactly the same.  The only thing that varies is how the user chooses to make that specification.  And "not choosing" (by not using the to_char function) is still choosing ... choosing to rely on nls_date_format.

Maybe you are looking for

  • Can't see the text!

    Just installed Pages from iWork08. I start a new document, and I can't see the cursor or any text. After I type something (maybe it's white on white?), I can highlight the text (which comes out white with a light purple background), so it's there. Bu

  • FV11 key combination issue - Materials - Services

    Hi MM experts, I am having problem while making the PO - Services. We are separate POs for material & services. FV11 key combination maintained for Materials : Plant/Vendor/Material FV11 key combination maintained for services : Plant/Vendor/Materail

  • SRM 7.0 with WEBDYNPRO PLATFORM

    Hi Experts, The following quesitions are shooted  on Product developers - SRM 7.0 Could any one clarify the follwoing : 1. Is SRM 7.0 is on webdynpro platform, if so, No ITS isavailable with SRM 7.0. 2. Is SICF is available for activating services in

  • Admin users appearing as group20(staff) Can't enable root user

    I'm trying to create a new default user template for a load of machines at work. According to everything I've found online in order to do this I need to log in as the root superuser but when I attempt to do so the terminal gives me a 'sorry' response

  • Disk Utility won't run with Snow Leopard

    I updated to Snow Leopard 10.6.2 and now when I run Disk Utility.app it says that it is version 11.1 and will not run. I'm not sure why this app didn't update at the same time. Where can I download 11.5 Disk Utility? Thanks!