Output only numeric values

CREATE TABLE XYZ( A1 VARCHAR2(10));
Inserting value in table
SELECT * FROM XYZ;
A1
1
999
45
$
^
+
=
How get output only numeric values ?

Hmm..
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>CREATE TABLE XYZ( A1 VARCHAR2(10));
Table created.
Elapsed: 00:00:00.07
satyaki>
satyaki>insert into XYZ values('&val');
Enter value for val: 1
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('1')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: 999
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('999')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: 45
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('45')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: !
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('!')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: @
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('@')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: $
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('$')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: #
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('#')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: ^
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('^')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: &
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('&')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: *
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('*')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: (
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('(')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: )
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values(')')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: -
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('-')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: +
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('+')
1 row created.
Elapsed: 00:00:00.00
satyaki>/
Enter value for val: =
old   1: insert into XYZ values('&val')
new   1: insert into XYZ values('=')
1 row created.
Elapsed: 00:00:00.00
satyaki>
satyaki>commit;
Commit complete.
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>select * from XYZ;
A1
1
999
45
$
^
A1
+
=
15 rows selected.
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>
satyaki>select * from XYZ
  2     where regexp_like(A1,'[[:digit:]]');
A1
1
999
45
Elapsed: 00:00:00.00
satyaki>
satyaki>Regards.
Satyaki De.

Similar Messages

  • How to restrict the user to enter only numeric values in a input field

    How to restrict the user to enter only numeric values in a input field.
    For example,
    i have an input field in that i would like to enter
    only numeric values. no special characters,alphabets .
    reply ASAP

    Hi Venuthurupalli,
    As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.
    On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer
    The attribute which you are binding to value property ;make its type as simple type which you made
    Hope this helps you
    Regards
    Rohit

  • Analogue Output from Numeric Value

    I have a VI which converts a digital signal into a speed based on the number of pulses per revolution. What I would like to do is now output that numeric value as a scaled 0-5V channel. I have tried to use the DAQassistant as with all of my other analogue outputs but it gives a buffer error. I know it can't be that hard to implement, can someone point me in the right direction...
    Thanks,
    Richard

    Thanks
    Files are attached save under version 11.0/
    Attachments:
    MeasureFreqandGraphSpeed.vi ‏13 KB
    ObtainSpeed.vi ‏23 KB

  • Function to extract only numeric value

    Hi
    I have a column which contains alphanumeric number like LAX4308720
    Is there any function in oracle so that I could extract only the numeric values like
    4308720 from that string..?
    Please provide me some solutions
    Shelly

    You can use translate as demonstrated above.
    You just have to make sure you translate out all the characters that you don't want that may appear in the string. e.g. if the only other characters are uppercase A-Z then you can just use:
    SQL> ed
    Wrote file afiedt.buf
      1* select replace(translate('LAX4308720', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','??????????????????????????0123456789'),'?') from dual
    SQL> /
    REPLACE
    4308720
    SQL>

  • Validation on numerical values in webdynpro

    Hi Friends,
    I am facing one probelem with  validation on numerical values. In my application there is a scenario.. Input fields are  Mibile number  and  email id.
    when i enter the invalid phone  number like : 09988wertyy    it should throw the error like  enter  only numerical values.
    In the same way  i should  validate the email id with format .. like  ratnakar.alwala@ accenture.com. if it is in valid then it should throw the error.
    could  any body  please give me the approach.
    Thanks and Regards
    Ratnakar reddy alwala

    Hi Ratnakar,
    For number validation, what I did was :
    1. Bind a context variable (Say Number) of type String to the input Field
    2. At the time of submission, do the following
    String num=wdContext.xurrentContextElement().getNumber();
    if(num!=null)
      try
            double num=new Double(amnt.trim()).doubleValue();
      catch(NumberFormatException exc)//IF AMOUNT ENTERED IS NOT VALID
       wdComponentAPI.getMessageManager().reportException("Invalid Number",true);
    Regards
    Fahad Hamsa

  • Limiting entry in a JTextField to numeric value and "%" value

    Hi,
    I want to allow the user to enter numeric value and % value
    How can I limit the user to make such a entry in JTextField

    Use the code given below to make your textfield accept only numeric values. You can modify itto include % values too.
    textField.setDocument( new TextFieldVerifier() );     
    class TextFieldVerifier extends PlainDocument {
    public void insertString( int offset, String str, AttributeSet attSet ) throws BadLocationException {           
    boolean valid = false;          
    if ( str == null ) {
    return;
    String old = getText( 0, getLength() );
    /* insert the new string at the given offset, into the old string */     
    String newStr = old.substring( 0, offset ) + str + old.substring( offset );
    try {
    /* check if the new string is a valid integer */
    Integer.parseInt( newStr );               
    valid = true;
    } catch ( NumberFormatException ne ) {          
    /* invalid, if not an integer */
    valid = false;
    Toolkit.getDefaultToolkit().beep();           
    if ( valid ) {
    super.insertString( offset, str, attSet );
    }

  • Function module to validate numeric values

    Hi all.
    Can some one please tell me Is there any Function Module to validate only numeric values?
    Like in year variable, it can never contain alphanumeric values or special symbols?
    Is there any function module to check, wheather the variable contains only numeric values, no alphanumeric value or special symbol?
    If there is no as such function module then what is the alternative approach we can take?
    Plz help me .
    Regards
    Dipankar

    Function Module NUMERIC_CHECK for Editing and checking numeric fields ( i.e. Num validations)
    Check using the Function Module "NUMERIC_CHECK".
    CALL FUNCTION 'NUMERIC_CHECK'
    EXPORTING
    STRING_IN = X
    IMPORTING
    STRING_OUT = X
    HTYPE = H_TYPE.
    if h_type = 'CHAR'.
    WRITE:/ 'Not Numeric'.
    else.
    write:/ 'Numeric'.
    ENDIF.
    REWARDS IF USEFUL
    GAURAV J.
    Edited by: GAURAV on Feb 3, 2008 2:19 PM

  • How to 'Only' allow Numeric value in the Edit Box in AcroDialogs

    Hi all,
    I've create an AcroDialog wizard, I need to allow onlu numeric values in the Edit Box. Can someone please help me with this validation?
    Regards,
    Chris

    There isn't a keystroke event for custom JavaScript dialogs, or any proper interactive events for the fields.  You can validate fields when the user presses OK, and you can test fields when the user changes focus by setting the "Action" property for the field.  But the only practical way to restrict user input to numbers is to use George's suggestion.  There is a number property for the fields but it has an undesirable side affect and I never use it.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

  • Error displaying numeric values with SPREADSHEET output

    Hi, I'm using Reports 10g R2 and I have all my reports with PDF output, they render just fine.
    I want to render some of them with SPREADSHEET output but don't know why in some case numeric values are rendered as ****** instead of the corresponding number.
    The same report shows numeric values correctly in PDF but no in some Excel cells, just SOME of them, not all.
    I know that Excel column is not short because the internal value of the cell are the asterisks.
    What could be happening?
    Thanks!

    Hi Ruby,
    please refer to some very basic documentation on CRM 2007 Webclient UI or the IC Webclient of CRM 4.0.
    What you are trying to do is create a value node and your code ABAP is wrong.
    Here a code sample. Typed it by hand so there might be errors in it.
    data:
      ls_struct  type /mystructure,
      lr_struct_ref type ref to data,
      lr_node type ref to cl_bsp_wd_value_node.
    ls_struc-/attribute1/ = 'Hallo Welt'.
    get reference of ls_struct into lr_struct_ref.
    create object lr_node
    exporting iv_data_ref = lr_struct_ref.
    typed_context->/yourNode/->collection_wrapper->add( lr_node ).
    cheers Carsten

  • Report results displays only (*), no numeric values.

    Dear all,
    The report result only displays asterick (*), no numeric values. But the field in the result thus has numbers which can be seen in display at the top in the excel sheet. why?
    Do i need to make any changes in Query properties or something else??
    Please advise.

    Hi,
    You should be trying to work to different units of measure or different currency. If you do any calculation with two values which has different unit then the result will be so.
    use NODIM() of the keyfigure and do the calculation. create a formula and add NODIM to keyfigure, then you should be able to see values but you will not get the unit along with value.
    Else you should go for conversion of units to single one and then you can get both values and units.
    Hope this helps
    Regards
    Akhan

  • Query only non numeric values in a column

    How to query only non numeric values in a cloumn.
    For example:
    Table1 has a column1(col1)
    Values:
    Row Value
    1 27376
    2 47D99
    3 83039
    4 DKFI*
    5 3J6
    Query should retrieve only rows(2,4,5).
    Thanks! for help
    Murali

    Version 2(PL/SQL) above is not clear enough, It can be tuned to the following:
    -- Create a function
    Create or replace function IsVARCHAR(pCol VARCHAR2) return VARCHAR2
    AS
    vNumber NUMBER := 0;
    begin
      vNumber := to_number(pCol);
      RETURN NULL;
    Exception
      When Others Then
        RETURN pCol;
    End;
    -- To See VARCHAR values (alpha-numeric) only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NOT NULL;
    -- To See NUMBER values only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NULL;Versatility here with PL/SQL, but I personally like SQL versions.
    Thx,
    SriDHAR

  • My configuration audio "output" is only numerique and I would like listen to audio by integrated loudspeaker. I can't use the keys "sound on my computer. If I click on I have a icon "forbiden".  Can you help me

    my configuration audio "output" is only numerique and I would like listen to audio by integrated loudspeaker. I can't use the keys "sound on my computer. If I click on I have a icon "forbiden".  Can you help me

    Si vous tappez sûr le cle <<option>> et cliquez vôtre souris de l'icon de haut-parleur
    de le haut partie de sa Desktop, vous pouvez voir les choix pour le son: les haut-parleurs internales, Line out et Digital Out. C'est tout ! Ou cliquez de la Pomme a gauche, choissisez Préferences, et Son, et voila..... le meme chose.....
    Merci d'avoir choisi Apple
    John B

  • Can you force a value into a read-only numeric data member?

    I have code that will force a value into a numeric data member. Unfortunately the numeric data member in question is read-only. Can you force a value into a read-only numeric data member?

    Andre,
    I think you should get together with the other engineers there at NI. I spoke to one on the phone yesterday and he told me that the read-only aspect relates to writing between the database and PLC. I'm trying to write to the database and he told me that I could do it.

  • Creating a sound from an array of numeric values and playing it on speakers

    How do I create take a sound I have stored as an array (or could be an arraylist if needed) of numeric values (at the moment as doubles) whiten my program and output it to speakers? I am using blueJ.
    for example (0, 0.1, 0.4, 0.8, 0.9, 1, 0.8, 0.6, 0.3, 0.1, etc...) would be a very high frequency sin wave.
    Edited by: alan2here on Feb 6, 2008 11:28 AM

    I stumbled upon this thread with a question somewhat related:
    I've recorded a wave file from microphone. But what I would like is an array of numbers in the same way alan said. I'm also working on my own project involving signal processing (i'm trying to do speech recognition).
    I can't really find a nice way of getting that array of numbers. I've tried to find out how wave file stores it's data, and directly read from the File object, but i figured there should be an easier way...
    I used this code to read the sound:
    *     SimpleAudioRecorder.java
    *     This file is part of jsresources.org
    * Copyright (c) 1999 - 2003 by Matthias Pfisterer
    * All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * - Redistributions of source code must retain the above copyright notice,
    *   this list of conditions and the following disclaimer.
    * - Redistributions in binary form must reproduce the above copyright
    *   notice, this list of conditions and the following disclaimer in the
    *   documentation and/or other materials provided with the distribution.
    |<---            this code is formatted to fit into 80 columns             --->|
    import java.io.IOException;
    import java.io.File;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.TargetDataLine;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.AudioFileFormat;
    public class SimpleAudioRecorder
    extends Thread
         private TargetDataLine          m_line;
         private AudioFileFormat.Type     m_targetType;
         private AudioInputStream     m_audioInputStream;
         private File               m_outputFile;
         public SimpleAudioRecorder(TargetDataLine line,
                             AudioFileFormat.Type targetType,
                             File file)
              m_line = line;
              m_audioInputStream = new AudioInputStream(line);
              m_targetType = targetType;
              m_outputFile = file;
         /** Starts the recording.
             To accomplish this, (i) the line is started and (ii) the
             thread is started.
         public void start()
              /* Starting the TargetDataLine. It tells the line that
                 we now want to read data from it. If this method
                 isn't called, we won't
                 be able to read data from the line at all.
              m_line.start();
              /* Starting the thread. This call results in the
                 method 'run()' (see below) being called. There, the
                 data is actually read from the line.
              super.start();
         /** Stops the recording.
             Note that stopping the thread explicitely is not necessary. Once
             no more data can be read from the TargetDataLine, no more data
             be read from our AudioInputStream. And if there is no more
             data from the AudioInputStream, the method 'AudioSystem.write()'
             (called in 'run()' returns. Returning from 'AudioSystem.write()'
             is followed by returning from 'run()', and thus, the thread
             is terminated automatically.
             It's not a good idea to call this method just 'stop()'
             because stop() is a (deprecated) method of the class 'Thread'.
             And we don't want to override this method.
         public void stopRecording()
              m_line.stop();
              m_line.close();
         /** Main working method.
             You may be surprised that here, just 'AudioSystem.write()' is
             called. But internally, it works like this: AudioSystem.write()
             contains a loop that is trying to read from the passed
             AudioInputStream. Since we have a special AudioInputStream
             that gets its data from a TargetDataLine, reading from the
             AudioInputStream leads to reading from the TargetDataLine. The
             data read this way is then written to the passed File. Before
             writing of audio data starts, a header is written according
             to the desired audio file type. Reading continues untill no
             more data can be read from the AudioInputStream. In our case,
             this happens if no more data can be read from the TargetDataLine.
             This, in turn, happens if the TargetDataLine is stopped or closed
             (which implies stopping). (Also see the comment above.) Then,
             the file is closed and 'AudioSystem.write()' returns.
         public void run()
                   try
                        AudioSystem.write(
                             m_audioInputStream,
                             m_targetType,
                             m_outputFile);
                   catch (IOException e)
                        e.printStackTrace();
         public static void main(String[] args)
              if (args.length != 1 || args[0].equals("-h"))
                   printUsageAndExit();
              /* We have made shure that there is only one command line
                 argument. This is taken as the filename of the soundfile
                 to store to.
              String     strFilename = args[0];
              File     outputFile = new File(strFilename);
              /* For simplicity, the audio data format used for recording
                 is hardcoded here. We use PCM 44.1 kHz, 16 bit signed,
                 stereo.
              AudioFormat     audioFormat = new AudioFormat(
                   AudioFormat.Encoding.PCM_SIGNED,
                   44100.0F, 16, 2, 4, 44100.0F, false);
              /* Now, we are trying to get a TargetDataLine. The
                 TargetDataLine is used later to read audio data from it.
                 If requesting the line was successful, we are opening
                 it (important!).
              DataLine.Info     info = new DataLine.Info(TargetDataLine.class, audioFormat);
              TargetDataLine     targetDataLine = null;
              try
                   targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
                   targetDataLine.open(audioFormat);
              catch (LineUnavailableException e)
                   out("unable to get a recording line");
                   e.printStackTrace();
                   System.exit(1);
              /* Again for simplicity, we've hardcoded the audio file
                 type, too.
              AudioFileFormat.Type     targetType = AudioFileFormat.Type.WAVE;
              /* Now, we are creating an SimpleAudioRecorder object. It
                 contains the logic of starting and stopping the
                 recording, reading audio data from the TargetDataLine
                 and writing the data to a file.
              SimpleAudioRecorder     recorder = new SimpleAudioRecorder(
                   targetDataLine,
                   targetType,
                   outputFile);
              /* We are waiting for the user to press ENTER to
                 start the recording. (You might find it
                 inconvenient if recording starts immediately.)
              out("Press ENTER to start the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually started.
              recorder.start();
              out("Recording...");
              /* And now, we are waiting again for the user to press ENTER,
                 this time to signal that the recording should be stopped.
              out("Press ENTER to stop the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually stopped.
              recorder.stopRecording();
              out("Recording stopped.");
         private static void printUsageAndExit()
              out("SimpleAudioRecorder: usage:");
              out("\tjava SimpleAudioRecorder -h");
              out("\tjava SimpleAudioRecorder <audiofile>");
              System.exit(0);
         private static void out(String strMessage)
              System.out.println(strMessage);
    }Daniel

Maybe you are looking for

  • How to find out application status on a server?

    Hi, How can i find whether the application is running or not on specific system and port in core java? //Gupta.

  • Photoshop CS3 Hangs when opening files

    PS hangs when opening, duplicating images. The longer it's on the longer the wait. I'm talkin' 15 - 20 seconds. Deleted the prefs multiple times. Anybody else having this problem?

  • Error the class for ABAP mapping doesnt exist

    hi PI gurus, i faced a probleme when i was trying to call a second Mapping which type is ABAp after another one which type is Message Mapping, why i m doing that because i was trying to folow the step by step of michal : http://www.sdn.sap.com/irj/sc

  • Dealing with inherited xml facts in business rules

    Hello Everyone, I encountered a problem while writing business rules for an xml input message which is of abstract type. The schema follows the xml inheritance and the structure is somewhat like - Document (abstract) *|* Message (abstract) *|* Notifi

  • In mapping need to concatenate 10 fields

    Hi All in Mapping need to concatenate more than 10 fields , is there any way to make it short can concatenate all in one stretch