validation of digital data with a format mask

Hello

I have the following situation:

field 'Amount' COMP (11.0) in a table.
a form for this amount with a p8_amount parameter and a format mask. for example 1234 becomes 1,234.

I entered a large amount of data.

Now, I want to build a validation.
But I get an error of conversion (character number) takes the apex the field amount 1234 makes 1.234
and that's why I no longer use to_number (causing the conversion error).

How to convert the parameter to a number?

Any response will be appreciated.

Thanks in advance.

Leoa

Hello

TO_NUMBER (String) may have problems if there is non-numeric characters, however, you can apply a format string so that it can be used in the conversion:

TO_NUMBER(string, '9G999')

Andy

Tags: Database

Similar Questions

  • Order by date with a format mask column

    10g - 10.2.0

    Hello

    This is my request
    select to_char(exp_Date,'Mon-YYYY') dt, count(*) from exp_main
    where exp_type like 'Income%Photo%'
    group by to_char(exp_Date,'Mon-YYYY')
    order by exp_date
    
     
    When I run this I get: not a GROUP BY expression

    If I remove the order by, it works fine.

    Is it possible to order by since the output of the query is sorted character.

    I search online most suggested to use the order of column_name. But does not work for me.

    Thank you!
    Ryan

    Hello

    Keep the date information as a DATE, with the exception (if required) for display. That means that GROUP BY and ORDER BY DATE, not a string:

    SELECT    TO_CHAR ( TRUNC (exp_Date, 'MONTH')
                  , 'Mon-YYYY'
                )          AS dt
    ,       COUNT (*)           AS cnt
    FROM        exp_main
    WHERE        exp_type     LIKE 'Income%Photo%'
    GROUP BY  TRUNC (exp_Date, 'MONTH')
    ORDER BY  TRUNC (exp_date, 'MONTH')
    ;
    
  • Download Apex 4.2 - blob in report with the Format mask

    Hello

    I need a little help.

    I have a report like this:

    SELECT id, file_name, dbms_lob.getlength (blob_content)

    of blob_docs;

    The column with the dbms_lob, is defined by the format mask, as a download link, saving up the BLOB to the user of the computer.

    My problem is a bit silly, I don't want to see 'Download', but the file name of each record, such as the 'link text'... but I can't seem to achieve this goal.

    My format mask looks like:

    DOWNLOAD: BLOB_DOCS:BLOB_CONTENT:ID:MIMETYPE:FILE_NAME:LAST_UPDATE:CHARSET:Attachment: download

    I tried to use #FILE_NAME # in the field 'Text download', since it is one of the column names, but nothing helped.

    Also used & FILE_NAME. but obviously does not work and gets the text "Download".

    All I want is a report that looks like

    File1

    File2

    File3

    Instead of

    Download file1

    Download File2

    Download file3

    Does anyone know how to get there?

    Thank you!!

    jaydarp wrote:

    I need a little help.

    I have a report like this:

    SELECT id, file_name, dbms_lob.getlength (blob_content)

    of blob_docs;

    The column with the dbms_lob, is defined by the format mask, as a download link, saving up the BLOB to the user of the computer.

    My problem is a bit silly, I don't want to see 'Download', but the file name of each record, such as the 'link text'... but I can't seem to achieve this goal.

    My format mask looks like:

    DOWNLOAD: BLOB_DOCS:BLOB_CONTENT:ID:MIMETYPE:FILE_NAME:LAST_UPDATE:CHARSET:Attachment: download

    I tried to use #FILE_NAME # in the field 'Text download', since it is one of the column names, but nothing helped.

    Also used & FILE_NAME. but obviously does not work and gets the text "Download".

    All I want is a report that looks like

    File1

    File2

    File3

    Instead of

    Download of file1

    Download File2

    File3 download

    Unfortunately (and annoying), it doesn't seem possible to do using the declarative format BLOB mask. Instead, a personalized download link should be generated in the report query using the apex_util.get_blob_file_src method of the API.

  • [REQUEST] Automatically display the number with the format mask

    Hi Expert,

    I use Jdeveloper 11.1.1.6.0.

    I have a problem to display the input text that automatically uses the format mask user input, as for example the entered user 10000 then the field will automatically display of 10,000

    Is this possible to do?


    I already find but I just had to format mask that the user must input 10 000 not automatically display in format.


    Please your advice, really appreciate your help.


    Thank you

    I already find but I just had to format mask that the user must input 10 000 not automatically display in format.

    Can you describe your use case a little more?

    The format is applied only when the focus is moved out of the field.

    You want to display the groups directly separator when the user inserts the value in the field?

    In this case, you will need to use javascript, and format the entry after each character. This technique is described in the blog of Frank https://blogs.oracle.com/jdevotnharvest/entry/get_social_security_numbers_right

    Timo

  • Default value in the item with the format mask DATE: DD-MON-RRRR HH:MIPM

    Dear all,

    I created OF type date DATE and mask game format: DD-MON-RRRR HH:MIPM

    and need to display the default code:

    declare

    v_start timestamp;

    Start

    BEGIN

    Select FROM_DATE IN v_start of TOUR_MAS

    where id =: P67_ID

    EXCEPTION WHEN OTHERS THEN

    v_start: = SYSDATE;

    END;

    RETURN v_start;

    END;

    But value display the DATE element is "11.02.00.000000 may 20, 15 h.

    In the table FOLLOWING is the timestamp.

    How to display the query result of default in the format ""HH:MIPM DD-MON-RRRR ". "

    How can I do that.

    Thank you

    Hi Maxence,

    Try this:

    DECLARE
    
      V_START VARCHAR2(64);
    
    BEGIN
    
      BEGIN
        SELECT TO_CHAR(FROM_DATE,'DD-MON-RRRR HH:MI PM')
          INTO V_START
          FROM TOUR_MAS
         WHERE ID =:P67_ID;
      EXCEPTION WHEN OTHERS THEN
        V_START:=TO_CHAR(SYSDATE,'DD-MON-RRRR HH:MI PM');
      END;
    
      RETURN V_START;
    
    END;
    

    Kind regards

    Kiran

  • Import ASCII dates with different format

    Hello

    I need to import data from a CSV of ASCII.

    The problem is the date format in this particular data file (.csv)

    The date format for day< 10="" and="" month="" from="" jan="" to="" sep="">

    AAAA/_M/_Dthe character '_' is a simple space, not an underscore literally

    The format of the date days > = 10 and Jan to Sep month is:

    _M/JJ/AAAA

    The format of the date days > = 10 and months of Oct to dec is:

    YYYY/MM/DD

    The date format for day< 10="" and="" months="" from="" oct="" to="" dec="">

    YYYY/MM/_D

    Possible solution:

    I already create a routine that recognizes the date in the title and one of the 4 (.stp) filter uses for data processing. These are the works.

    Next problem:

    The days are separated into 2 files, a file from 09:00 to 21:00 one day and the other from 21:00 to 09:00 on the following day. It's the way I've lost data when the day changes from 9th to the 10th of each month and the month change of Sept Oct and Dec to Jan.

    I just need to delete the blankspace unconfortable before the changes of dates 2-digit, but I do not know how to deal with the before CSV imported to tiara (10.2).

    My other idea is to recognize this file and any double (once with each please) but I need to exactly position the import is not the problem with the data of novalue. (Until know I got complicated for a simple mistake of blankspace).

    I hope that you have ideas...

    Thanks in advance...

    I don't know if I understand that measures are not clear. Here's what I think you want to do:

    (1) load data from different files in DIAdem

    To do this, you must use "DataFileLoad("E:\Customer_Requests\caracasnet\log(111231).csv","caracasnet_log","Load") call.

    You call DataFileLoad for each of the files.

    (2) you want to concatenate the groups.
    This should be no different than what you've done up to now

    (3) you want to store the data in a file (TDM).
    To do this, you must call DataFileSave (...)

    Let me know if you have any other questions...

  • Excerpt from SQL data with specific format.

    All,

    I have the oracle database version 10.2.0.4 in which I need to extract data from a table using the format below.

    1.1 st 3 positions of the postal code, followed by
    2.1 st letter of the name, followed by
    3.1 st 2 consonants in the name of the street, followed
    4 2 (for companies)

    I can use the function substr to 1 and 2 above.
    For 3, I tried regexp_substr. but the output includes vowels too. I don't know how to proceed. Is there another function or is there another way to do it?

    I am concatenating 3 columns and display data as below.
    for example
    Col1            Col2         Col3     
    FLOOR INC  24540       67 FRANKLIN TPKE STE 114 
    
    Displayed as 
    245FFR2     
    234AAS2 
    Help, please.
    -- testdata:
    with yourtable as
    (
      select 'abcdefg' name from dual union all
      select '1aBexea' name from dual
    )
    -- query for first two consonants:
    select substr(regexp_replace(regexp_replace(name,'[^a-zA-Z]',''),'[aeiouAEIOU]',''),1,2)
    from yourtable;
    

    Explanation:
    -Internal Regexp removes everything except the letters.
    -Outer Regexp removes vowals and keep the consonants.
    -substr selects the first two consonants.

  • Format mask number in the XML editor reports

    Hi all

    I have a requirement in the format mask in xml publisher reports.

    I have a field in my report that the quantity,

    1 > if the value is 1234 I need to show as 1 234

    2 > if the value 1234.56 I need to show 1,234.56

    so I tried with properties of form with number format mask ' #, # 0.00' decimal so that's good, but for like number for 1234 also he 1,234.00 impression so I need 1 234, how I can do this, please help me.

    Thank you

    Thank you Deb to clarify. Yes just check the decimal (.) will work.

    I tried with my example of xml data, and it worked.

    Try this now...

  • FRM-50027: mask format not valid for given data type.

    Hello

    I have a format mask to a number data element UNIT_PRICE: (15,3) dataype

    It was fine then got underway the following error
    FRM-50027: Invalid format mask for given datatype.
    Edit Item: UNIT_PRICE
    Item: UNIT_PRICE
    Block: WH_T_ITEMS
    Form: WH03_OPENING_BALANCE
    FRM-30085: Unable to adjust form for output.
    any help will be appreciated,

    Kind regards

    Abdetu...

    In the palette for the UNIT_PRICE property, what is the value of Data Type and maximum length value? "L999G999G999G999D99" is a valid format for a text element of type 'number '.

    Craig...

  • Format of digital data and data mask

    (1) is there a way to remove the timestamp of 12:00 a date with TO_CHAR column value? except that the value we should display time value for column, like this
     
                 01/12/2009 01:15:01  , 01/12/2009 12:00:00 
                 
    It should be like
     
                 01/12/2009 01:15:01 , 01/12/2009 
                 
    (2) display decimal '0.' infornt of the numerical value? I used to_char ('0.1 ','9999990.99 '), but his views spaces how can I switch fm for numeric values?

    Thank you
    HESH.

    Published by: Hesh on June 23, 2009 12:27 AM

    Hello

    Try this query. Change the time of below date of sample of exclusion of the 12:00:00 ' to test it.

    This application has been tested and works great.

    SELECT
    DECODE (TO_CHAR (TO_DATE (JANUARY 12, 2009 12:00 ',' DD/MM/YYYY HH), 'HH'), 12:00:00 ', TO_CHAR (TO_DATE (JANUARY 12, 2009 12:00 ',' DD/MM/YYYY HH), "DD/MM/YYYY"), TO_CHAR (TO_DATE (' 01/12/200912:00:00 ',' DD/MM/YYYY HH), ' DD/MM/YYYY HH')) AS FORMATTED_DATE
    OF THE DOUBLE

    Output

    FORMATTED_DATE
    12/01/2009

    Output

    FORMATTED_DATE
    12/01/2009 01:59

    Please describe your problem # 2 precision.

    Kind regards
    Rajesh.

    Published by: wissam Rajesh on June 23, 2009 03:29

    Published by: wissam Rajesh on June 23, 2009 03:35

  • Spry form validation Date with default value error

    The spry form validation below was created with DW CS6

    I created an HTML form and displayed with PHP to a MySQL database.  One of the lines of form is to enter a date.  This line uses a 'out of the box' sprytextfield data validation without changes to its CSS or JS:

    HTML

    < span id = "sprytextfield1" >

    < label for = "servComDate" > Date beginning? < / label >

    < input type = "text" name = "servComDate" id = "servComDate" >

    < span class = "textfieldRequiredMsg" > a value is required. </span >

    < span class = "textfieldInvalidFormatMsg" > Invalid format. </span >

    </span >

    < script type = "text/javascript" >

    var sprytextfield1 = new Spry.Widget.ValidationTextField ("sprytextfield1", "date", {index: "00/00/0000", format: "mm/dd/yyyy"});

    < /script >

    On request, the form value is captured via PHP and date format is converted to a format of MySQL before entering in the database.

    PHP

    $servComDate = date ("Y-m-d", strtotime($_POST['servComDate']));

    It all works perfectly.

    Now, I created another page with a HTML form to change information.  First, PHP takes the field in the database and converts it to MySQL format to the format used in the sprytextfield above, in which it was created.

    PHP

    $servComDate = strftime ("% m/%d/%Y", strtotime ($row ["servComDate"]));

    Then the HTML form is filled with existing value

    HTML

    < span id = "sprytextfield1" >

    < label for = "servComDate" > if the Service is coming soon, do you know when the service will begin offered? < / label >

    < input type = "text" name = "servComDate" id = "servComDate" value = "<?" PHP echo $servComDate;? > ">"

    < span class = "textfieldRequiredMsg" > a value is required. </span >

    < span class = "textfieldInvalidFormatMsg" > Invalid format. </span >

    </span >

    By filling in the form with existing value appears with the right in the box format, it shows these 'mistakes ':

    value is required. Format invalid.

    As I said above, I have not changed the CSS or JS that is loaded with the Spry textfield, so I don't get that here.

    I'm obviously something wrong with pre-filling a Spry textfield with a default value.

    What is the real need have a default value on a Textfield of Date Validation Spry?

    Thanks in advance!

    Make sure that, in the page change the constructor looks like

    var sprytextfield1 = new Spry.Widget.ValidationTextField ("sprytextfield1", "date", {index: "00/00/0000", format: "mm/dd/yyyy"});

    The following works fine for me

    ">

    A value is required. Format invalid.

    GRAMPS

  • What file format to choose to write digital data to the file? 'Text' or 'xlsx '.

    Hello

    I have a request I want to acquire analog input data with NI USB DAQ 6352; to 50 ksamples/second sampling rate, with 8 channels of analog input NI USB DAQ 6352 and I need to display these data on a chart and at the same time I have to back up this data in a file for future recording and analysis.

    My questions are: 1. what file format would be more effective and more appropriate for this application? text or xlsx.

    2. which preferred delivery system to choose?  the category of execution.

    3. what priority should be set? normal or time critical.

    Concerning

    Jamal_IE wrote: I could not find this 'Input voltage - continuous' example in examples of LabVIEW. Could you pls see the path or just download this example VI?

    You do not have installed for your version of LabVIEW DAQmx or you do not have a good search.  It's right there for me.

  • How can I determine what digital data was issued last with the regeneration?

    Is there a way to determine the last digital data output if you are running a quick revival and regeneration?  Right now I use a digital channel not used by the channel with the same clock that I use for other data capture. It works very well and I know that the data I receive are correct, but there is something wrong with burning a channel for that. The data I am regenerating changes several times during the trial for counting samples to determine where I was in the buffer would make my code more complex and the chances of a mistake to increase.

    I have a mixture of material that I use for a cDAQ-9172, a box of series M and a PXI-1033 USB.

    Hello Tom,

    There is absolutely something wrong with having to use one of your channels to monitor what you're out, however, it's the best we can right now.  The problem is, when you set a buffer until the release, the access card to this memory stream location it will regulate.  It's speed leaving and overall card design.  There is no way back on the material for do what you are looking for and no software to interact directly with the location of the buffer.

  • Dynamic action for validation of date with the notification message plugin

    Hi all

    Someone help me please with dynamic action for validation of date with the message notification plugin. I have a form with two elements of the date picker control and message notification plugin.

    The requirement first user selects the exam is finished and then selects the date. So, if the date is greater than the date of the examination is over + 2 years then doesn't trigger the message notification plugin. I tried to create that dynamic action on the date picker date that triggers the scheduled issue notification message but I want to make conditional, I mean displays the message only if date of the selected is greater than the date of the exam is finished more than 2 years.

    In terms simple, notification is displayed only if provided is superior to (date of the exam is completed + 2 years).

    I use oracle apex 4.0 version and oracle 10g r2 database. I tried to reproduce the same requirement in my personal workspace. Here are the details. Please take a look.

    Workspace: raghu_workspace

    username: orton607

    password: orton607

    APP # 72193

    PG # 1

    Any help is appreciated.

    Thanks in advance.

    Orton.

    You can get the value of the date of entry:

    $(ele) .datePicker ('getDate');

    So what to add functions such as:

    function validateNotification (d1, d2) {}

    Date1 var = $(d1) .datepicker ('getDate');

    date2 var = $(d2) .datepicker ('getDate');

    if(date1 && date2) {}

    return ((date2.getTime()-date1.getTime())/(1000*24*60*60))>(365*2);

    } else {}

    Returns false;

    }

    }

    The logic based on setting (I have two years from years of 365 days preceding)

    Then in the D.A. specify a JavaScript expression as:

    validateNotification ('P2_REVIEW_COMPLETED', this.triggeringElement.id)

    Refer to page 2 for example.

  • Number format not valid in the data transfer Assistant

    I'm trying to download data from a CSV file in a table via the download data wizard. However, it always seems to fail on some lines with an error "invalid number format". Even if I stick one of these lines in the wizard, it still does not work. There is nothing wrong with the data, and I can do a regular insert Toad with no problems.

    The data are:
    28126238,101, RM, 29/01/2011

    The table looks like this:
    CREATE TABLE STR_PROD_UPLOAD
    (
    NUMBER OF PROD_CD,
    NUMBER OF STORE_CD
    CHARACTER VARCHAR2 (10 BYTE),
    DATE OF REPL_START_DT
    )

    It works very well on Toad:
    INSERT INTO STR_PROD_UPLOAD)
    STORE_CD,
    PROD_CD, line, repl_start_dt)
    VALUES (to_number('101'), to_number('28126238'), 'RM', to_date('1/29/2011','MM/DD/YYYY'));

    Anyone have any ideas on what might be wrong or how I can go about the matter of finding?

    FYI - evolution STORE_CD of a varchar2 and PROD_CD solves the problem, but I would like to know if it is possible to solve this problem for later use.

    Thx John

    Hi John,.

    For some reason, I get the same error. However with the download of the data, you can still provide you own number format in the case where the application could not a defined automatically. In your case, using Date / field number Format (for example: 99999999) will force the system to use the supplied format.

    Concerning
    Patrick

Maybe you are looking for

  • Since the update of Firefox, Google appears as a string of foreign characers

    Hi, since the update of Firefox, as the title suggests, any google page seems just a string of characters. I had pages like this before, but only for connections to live stream. I disabled all the plugins addons and Google-related, but the problem st

  • HP 8440p: Audio device high definition - device cannot start (Code 10)

    I'm having a problem of isolation an indication in device with high definition Audio Device Manager. I have Intel Graphics with this machine. The OS is W10 Pro. I loaded the audio driver for Windows 7 64-bit, but that made no difference. Device Manag

  • Install a touchscreen on the terminal.

    Hello I have a touch screen with windows CE6.0 software. When I logg as administrator on my terminal and find the software. I click on the software, but there is no response. Is sorry knows how can I install the software for/on my HP T5550 terminal t

  • Server web cRIO

    Hello I have a cRIO (with a 9014 controller) system, which was running 3.1 OR-RIO, and a web server based application, without any problem. Now, I went to the 3.2.1 format... I 2009 LabVIEW and NOR-RIO cRIO disk, install the new version of the softwa

  • When I plug my HP Officejet 6500 E709a in my telephone jack incoming calls, get a busy signal.

    I have Brighthouse for my phone, internet and television. I recently moved and in my previous House, I have brighthouse and the same in one and same phone. I have a new computer with windows 7. If I pull the phone line I can get incoming calls. If I