How do u convert a numeric value to char

hi,
how do u convert a numeric value NUMBER(22) to a character value.... like a to_char() function?
i've tried the CAST function it won't work.

Hi,
Use of CAST function will convert NUMBER to CHAR but it takes a lot of time if there are large number of recrods.
Syntax:
CAST(col_name AS char)
I have tried this, it worked fine for less records.
Are you getting any error while using cast function or while querying..
As far as I know it won't give error in these cases (if correct syntax used) but it will take very much time (depending on the number of records) while querying.
-Vency

Similar Messages

  • How do i convert a float value to a double value?

    How do i convert a float value to a double value? HELP PLEASE!! im very stuck!! i gota float data type and i need to convert it to a double data type in order to use it in another operation.....
    thank u so much!

    safe dint realise ppl were so arrogant. thanks for the reply but less of the sarcasm!

  • How to configure visa to adquire dat from serial port and then converted to numeric value from a home embedded device

    I already stablish communication with my serial port using VISA, selecting COM1 as the resoure name.
    After that, I tried to read the data from the port (as we know the data was in string format )but I need to convert the data to numeric value to hadle it (no arrays).
    Another main thing is that I'm develoing a new based Embedded design and tthe info that will trhow out from the device to the PC is binary.
    How can I solved the problem, and if I want to make bidirectional communication with my system how can I do it? The VISA intructions as *IDN? and so forthetc can be recognize by the external system if the COM1 port is recognized by NI Max as ADSRL1::I
    NSTR1?

    Hello,
    For an example of bidirectional serial communication in LabVIEW, please see the shipping example LabVIEW <-> Serial.vi. This can be found from LabVIEW by going to Help >> Find Examples. From the example finder, select Hardware Input and Output >> Serial >> LabVIEW <-> Serial.vi.
    Once you are able to read the string data in, you can use the VIs in the String/Number Conversion palette to convert the data to numeric format. To access these, right-click on the block diagram >> All Functions >> String >> String/Number Conversion.
    Let me know if this does not help.
    Regards,
    Sean C.
    Applications Engineer
    National Instruments

  • Given a string, how do you find the numeric value in sparse ring?

    Situation: I receive the string value of the sparse ring, and a control reference to the same type of control, but not the control that sourced the string. How can I convert the string, into the actual numeric value of the ring? For example:
    Using the "VISA Select Event Type" ring (Functions -> Instrument I/O -> VISA -> Advanced -> Event -> Select Event Type.ctl), lets say I get the string "ServiceRequest" how do I convert that into 1073684491, the actual value of the ring?
    This is a rework of an existing function that worked fine with "normal" rings.
    Thanks.

    Unfortunately this method will not work, its a generic routine that must be able to take any ring, so I can't hardwire the cases to known outputs. And, of course, searching the array of Strings[] will just find me a useless index.
    My interm solution is this:
    1) pick a small, but likely range of possible values for the ring
    2) iterate through these values, assigning each one in turn to ring
    3) read the RingText property to see if it matches the passed string
    4) if it does, then exit. If it doesn't keep looping.
    5) if no value produces a matching string, declare defeat (raise an error or produce other output that indicates a match could not be found).
    The routine only runs in the UI so I am not too concerned about the time delay this method will i
    mpose, but I would greatly appreciate a smoother solution.
    Thanks for your suggestions.

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

  • How do I assign a numerical value to text cells in cartesian products?

    Hi, this is more of a two part question.
    Question 1
    I need to be able to assign numerical values (Table Value £ of set up) to text cells (Set Up).
    1. The table "Combinations" then uses the formula
    IF($A3≤Information::$B$8, MOD(INT((ROW(cell)−3)÷PRODUCT(C$1:$G$1)), B$1), "")
    to take info from the "Information" table and create all possible permutations of "Set Up"
    2."List" is the printed list of "Combinations"
    3."Output of list" concatenates the data from "List".
    Question 2
    4. How do I print out the total numerical value of the concatenated string of "Output of List" into Output (£) of List"?

    >
    When posting code or code snippets. HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
    Here is how the first code snippet would have appeared in code tags.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    float num1, num2, num3, result;
    num1 = Float.valueOf(jRadioButton1.getMnemonic());
    num2 = Float.valueOf(jRadioButton2.getMnemonic());
    num3 = Float.valueOf(jRadioButton3.getMnemonic());
    result = num1+num2+num3;
    jTextField1.setText(String.valueOf(result));And while I'm on the subject of retaining the indentation of the original sample, please use one of the two common conventions for indenting code blocks. E.G.
    Convention 1:
    class TheClass {
        TheClass() {
    }Convention 2:
    class TheClass
        TheClass()
    }

  • How to Convert a HEX value to CHAR value...Unicode Issue...

    Hi,
    How can I convert HEX value to CHAR value.
    The Code in <b>non Unicode</b> system is:
    DATA: t_text LIKE tline OCCURS 0 WITH HEADER LINE.
    constants:   c_hex_20a5(2) TYPE x            VALUE '20A5'.
    t_text-tdline = 'seller of the item so listed.  A legend of the Seller Code(s) is as'.
          TRANSLATE t_text-tdline USING c_hex_20a5.
    The same code give error in <b>Uni-Code</b> system:
    <b>error is "c_hex_20a5 must be an character type object (C, N, D, T or String type)."</b>
    If anyone know, what is the solution, please let me know.
    Thanks!
    Puneet.

    Hi,
    Try declaring the Hex chars using the ABAP char utilities. This is just a sample piece of code on how to declare and use:
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    DATA:  ws_lf TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    data:    c_newline           TYPE x VALUE '0D'.  [ it is zero D, for carriage return ]
    ws_lf = c_newline.
        CONCATENATE it_tab-maktx
                    ws_lf
                    ws_template
                    INTO it_notificatn-template.
    Hope this helps...
    Regards
    Subramanian

  • How do I allocate a numerical value to a 5 part likert scale question

    I have a survey questionaire and the 15 questions are all arranged on a 5 part 'Liket scale' of strongly agree to strongly disagree.
    How do I allocate numerical values to each question response? 
    I don't want the respondents to see the scoring.
    The reason I need to do this is some response lines are reverse scored. That is to say some lines would be scored 1 to 5 and other lines 5 to 1.
    I think this feature is available on survey monkey.
    Is it available in Acrobat X Pro or Formscentral?
    I'd appreciate your suggestions
    Kind regards
    spreid1

    Hi,
    You can assign numerical responses to the likert answers as follows:
    1. Go into the response table and select the "Table" toolbar button:
    2. Select the header for your Likert questions in the response table.
    3. Click the "Choices" button on the toolbar and select "Edit choice list..."
    4. Select the checkbox for "Assign data values to choices".
    5. Enter the choice data values in the right-hand column.

  • How do I apply a numerical value to a word in numbers

    For example - decision maker = .75

    What is the relationship between the 'word' and the numerical value?
    If it's a mathematical relationship, your use a formula.
    If it's arbitrary, then you need a table showing the value associates with each word (or in this case, phrase).
    Formula in column B of Main:
    B2: =VLOOKUP(A,Lookup :: A:B,2)
    Filled down to B10.
    To avoid the error messages in B6 to B10, Enclose the formula in an error trap as below:
    B2: =IFERROR(VLOOKUP(A,Lookup :: A:B,2),"not found")
    This will replace the error triangle with the words 'not found'.
    Regards,
    Barry

  • How do I return a numeric value to a Sapscript

    Hi,
    I'm calling a subroutine from a sapscript using the perform command. I'm passing a material number to the routine and it is suppose to return the unit price of the material to the sapscript form. This is not working because the field is a currency field and according to the documentation I read so far, the return values must be character strings, so how can I pass his non-character string value back to the sapscript form.
    Please assist.
    Thanks
    Chris

    In column D I will insert the formula:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",IF(C>B,"",1))
    In A1 I will insert:
    =SUM(D)<0
    or
    in column D
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",C>B)
    in A1
    =COUNTIF(D,FALSE)=0
    Yvan KOENIG (from FRANCE mardi 2 septembre 2008 12:11:28)

  • How do I assign a numeric value to an alpha character within a form and still run a total?

    I am trying to build an attendance sheet where P=Present, A=Absent and so on.  I've created the summary field correctly however the individual fields will only take numeric characters.  I would like for the user to be able to enter P, the P stay there visually but have a "real value" of 1 and then have a numerical total at the end.  In other words, P=1, A=0, etc...
    Thanks in advance for your help!
    Lucy

    Hi Lucy
    Create a text field called "Total" and make the following its custom calculation script:
         var presentDays = [];
         for (var i=0; i<this.numFields; i++) {
             var f= this.getField(this.getNthFieldName(i));
             if (f.value=="P" || f.value=="p")
             presentDays.push(1);
         var p = presentDays.length;
         this.getField("Total").value = p;
    The above will search through your form and find all fields with "P" or "p" in them, in which case it adds 1 to the total and displays it in the "Total" field.
    I hope this helps.
    Michael

  • How can I Convert a numeric string to a formatted string?

    I have a string value returned from a background tool that will range from 0 to possibly terabytes as a full number.  I want to format that number to use commas and to reduce the character count using an appropriate size modifier (KiB, MiB, GiB, etc).  I've tried converting the string number to a Double value using Double.parseDouble() and then performing the math based on the size of the value with this code:
    Double dblConversionSize;
    String stCinvertedSize;
    dblConversionSize = Double.parseDouble(theValue);
    if (dblConversionSize > (1024 * 1024 * 1024))
         stConvertedSize = String.format("%,.000d", dblConversionSize / 1024 / 1024 / 1024) + " TiB";
    I've also tried using
         String.valueOf(dblConversionSize / 1024 / 1024 / 1024) + " TiB";
    However, the formatting is failing and I'm either getting a format exception or the result is displayed as a number with no decimal component.
    Anyone have a recipe for this?
    Thanks,
    Tim

    TOLIS Tim wrote:
    Thanks, but the reason for using Double is that the division math can leave me with values like 2.341 GiB.  I don't want to drop the values (or round) on the right side of the decimal point.
    Then you may look for DigDecimal which avoids digitization errors.
    NumberFormat will handle all subclasses of Number. You might need another specialization. Just look at the API which one is suitable.
    bye
    TPD

  • How do I convert an HSB value  (-180 +180) into 0 - 1

    HI there
    Im a designer and have been colour shifting some images using flashes HSB filter that uses -180 +180 values. We're designing an iphone app and apparently the HSB used by the sdk requires a figure of between 0 & 1.  Does any body know a way to convert?
    many thanks for your help!
    Nick

    (Value + 180)/360
    Adding 180 makes sure the value is between 0 and 360. Dividing by 360 then scales that to the range between 0 and 1. (0/360 = 0 and 360/360 = 1)

  • How to generate password alpha numeric value

    dear friends,
    i have written a simple pl/sql to generate a password.
    declare
    cursor c1 is select * from passwd;
    begin
    for I in c1
    loop
    if I.pfno < 3000 then
    update passwd set pwd=I.pfno where i.pfno=pfno;
    ELSe
    update passwd set pwd=lpad(round(I.pfno/20520),4,'0') where i.pfno=pfno;
    commit;
    end if;
    end loop;
    end;
    In this the pfno is 8 digit alpha numeric. I get password generated when it is only numeric but how could i get if pfno is like 04MAS155.
    Kindly help as i have to generate the same as early as possible. I have already been given with procedure to generate random password by our guys but still as i had already generated password to some employees in my concern based on querries like above i request your help to generate for alpha numeric 8 digit number.

    -- get a random string
        FUNCTION string (opt char, len NUMBER)
              /* "opt" specifies that the returned string may contain:
                 'u','U'  :  upper case alpha characters only
                 'l','L'  :  lower case alpha characters only
                 'a','A'  :  alpha characters only (mixed case)
                 'x','X'  :  any alpha-numeric characters (upper)
                 'p','P'  :  any printable characters
            RETURN VARCHAR2;  -- string of <len> characters (max 60)
        PRAGMA restrict_references (string, WNDS);

  • How to Return only alpha-numeric Values

    In my query, I want to return only records for which data in a specific column is alpha-numeric. Any records having this field as NULL, or containing symbols, I want to exclude. What's the best way to do this?
    Thanks,
    Brice

    select str from tab1
    where str is not null
    and translate(str, '_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','_') is null
    /Regards
    Dmytro

Maybe you are looking for

  • How To Handle With Back Ground JOB From WEBUI When Click On "Appove"

    Hi How To Scheduled A Job Through ABAP Report In back end  Of CRM when i click on "Approve" Button in WEBUI  From result list. As per My requirement I have a Search View and Result View In Search View I have  Below Fields ITC Vendor ID     Claim Stat

  • Customizations not reflected in 11.5.10

    Hi All We have upgrated our Oracle Apps from 11.5.5 to 11.5.10. but the customizations that are done in 11.5.5 are missing in 11.5.10. Actully along with five tabs( Home,Orders,Shipments,Planning,Account,Product) , three more tabs are added. But when

  • Using the Illustrator scribble effect in Flash?

    In the app I'm building, there are 5 pie pieces that act as progress bars. The design idea is to have them fill from 0% to 100% based on the completed status of the section of the app they refer to. In the design comps, the fills are created in Illus

  • JSF Date Error

    Hi all, I am using Tomahawk t:inputCalendar to enter dates in my web application. However the dates values which are unbinded into my backing bean is always one day before the selected value. I also get this behaviour when when t:inputText. I am usin

  • Can subreports use same selection parameter(s) as main report?

    Hi, Is it possible to create subreports that use the selection selection parameter(s) as the main report. And if so, would the user need to make their selections twice, or just once when they open the report? Thanks, Jon