Conversion of ASCII values

Hi all

We have characters as long as
 Test ½ 
And we want to convert using SQL query as below
 Test 1/2 
Any help / suggestion.

Thank you

Funny moment.

{: identifier of the thread = 2495768}

Are you work colleagues?

Tags: Database

Similar Questions

  • I have a pdf file that contains the text if I copy all the text and paste it into Notepad and save the .txt file is it changes the ascii value of the text?

    I have a pdf file that contains the text if I copy all the text and paste it into Notepad and save the .txt file is it changes the ascii value of the text?

    If the encoding is ASCII? Laughing out loud

    Be well...

  • How to find out the ASCII values for the Spanish character

    Hello

    I had an obligation to maintain the Spanish character and must also always records based on the Spanish character.

    Kindly guide me for below.

    To filter the records that contains Spanish characters?
    To get the ASCII values for the particular column?

    For example, we can find the ASCII value of 'a' using the select syntax ASCII('a') double.

    But I want to find the value of the particular column ASCII values. That is to say. name.
    For example, the customer name is 'Suresh', I want the ASCII values for the entire name of 'Suresh '.

    Please do the necessary help / advice on that.

    Thank you
    Orahar

    To expand on what I said in my first post, you want to do something in this direction:

    with t (thename) as
      (
      select 'Suresh' from dual
      )
    select thename
         , substr(TheName, level, 1)
         , ascii(substr(thename, level))
      from t
    connect by level <= length(thename);
    

    The result of the above query is:

    THENAM S ASCII(SUBSTR(THENAME,LEVEL))
    ------ - ----------------------------
    Suresh S                           83
    Suresh u                          117
    Suresh r                          114
    Suresh e                          101
    Suresh s                          115
    Suresh h                          104
    
    6 rows selected.
    

    Note that the WITH statement is only there to simulate a table for this example. With a table, all you do is get rid of the with and replace it with the name of "t" for your table name (also the name of the column with name column has in your table).

    Finally, I suggest that you post your question with, an example of table and the output you want for PL/SQL forum. There are people out there who will give you all sorts of ways to solve this problem.

    HTH,

    John.

  • How to find the ASCII value of the TAB?

    Hi friends,

    I'm trying to find the ASCII value of the TAB character using ASCII standard as:

    SELECT ASCII ('< TAB >') FROM DUAL;

    I'm running the command above in SQL * more.

    Is not treated as TAB.
    It is considered space and give the ASCII value of the space - 32.

    Please let me know how?

    Version of Database - 9i

    Concerning
    Anthony Alix.

    Its only editor that gives you the problem; Try it on TOAD or sql developer, it works perfectly.

    Is there a particular reason you want in sql * more?

  • Looking for an Ascii value within the chain

    Dear all,

    I want to find when the 92 ASCII value Hexagon is less significant for some reason, when people copy and paste a string, pointed in our database from MS Word, they are coming up as?. How would I find them. Here is an example of my table.

    Table_Notes
    Customer_id Notes
    11111111 Hello, my name is Jonny B
    Hello 11111112, I can? t find my hat <-see how the apostrophe is a? not a '
    11111113 what is your name? <-who make the issue is supposed to be there

    Any ideas?


    The only thing I can think of is this:
    Select
    -case when notes like ' %? %' then 'Fail' else 'Pass' end
    Of
    table_notes;

    However that show me everything, any ideas?

    As s_2 pointed out, it is likely has something to do with your character in the database. The strange character is likely to be a result of the 'smart' quotes in MS Word is pasted into the field. If you're sure it's 92 hex (146 dec), then you might do something like:

    SELECT CASE WHEN INSTR(notes, CHR(146)) > 0 THEN 'Fail' ELSE 'Pass' END
    FROM table_notes;
    

    Your posted case returns only lines with an exclamation mark actual. Tools like sqlplus display an exclamation mark when they can not disply the real character, but it is stored as the character of real.

    John

  • Read byte with a value up to 127 lire byte with an ASCII value greater than 7F (127 dec)

    Hello

    I have to read a byte with a value greater than 127, Labview turn 27.

    In help I saw that Labview provides a description of ASCII that pour values ranging up to ' 127.

    What do I need to do?

    LabVIEW 6.1

    Windows XP

    Hello

    I want to read a byte with a maximum value of 127, but Labiew reurn arround 27 value

    How do I do?

    Rigid wrote:

    Thanks for your help. I'm not changing lyke I understand (my English is poor quiet...)

    I have another program that communicate with the instrument. I know byte (6) must be greater than 18 (greater than 7F actually).

    But with Labview, I'm only 18.

    While it might be higher than 18 x, an I8 is signed, and therefore it cannot be greater than x7F - it has a range of-128 to 127. A U8 is not signed, and it's why he has a range from 0 to xFF. However, x 18 is the same if you treat as signed or not signed. I don't see how LabVIEW can read a wrong value on the serial port. Are you sure you're looking at the correct byte? Your code shows that you split the chain twice. Are you sure that you do this properly?

    Given that you use on Windows you can recheck the chain received using PortMon. Allows you to see what is actually received by the driver for the serial port on Windows.

    P.S. I actually meant the whole byte function.

  • How to convert binary data from the Panel controls in ASCII values?

    Hello

    I seemed to face a roadblock with how to convert binary values in ascii.

    I created this .vi to save all control values in an .ini file and call them at that time where I will carry out the .vi as shown in the file attached. Registration key to simply save the data and Cancel button discards all current changes.

    I would like to understand how to retrieve all the values of control to ASCII, so I assign to a global variable for later use. I've looked everywhere for a good reference document, and I couldn't find one that would explain my question. I would be greatly appreciated if someone could point me in the right direction.

    Thank you

    Sam

    I tried a simple way to save control values in the front panel

    Not reinventing the wheel, when there are ready to use of solutions, for example:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/209753

    Use the MGI save & restore settings VI of the palette (for example, it records all the settings that have been changed in a graph, which is very useful) and the MGI Save (restoration) Front Panel data live (to save and restore control values in the front panel).

    Here is an example:

  • ASCII value &amp;

    Hello everyone,
    How to find the value ascii of '&' in the oracle database using sql query.your help much appreciated.
    Thank you.

    run

    Set define off;
    Select ascii('&') from dual;
    
  • Help with a sql using the ASCII value

    Hello

    I have a table with the following data
    DOC_NO     CLIENT_REV
    ------     ----------
    240          A
    240          B
    240          B
    240          C
    240          C
    240          C
    240          0
    240          1
    240          1
    240          1
    240          2
    240          2
    240          2
    241          A
    241          A
    241          B
    241          C
    241          C
    241          D
    The requirement is retur the following values:
    240          2
    241          D
    I tried with the ASCII function, but the necessary result is somewhat complicated. That is to say for a group of doc_no I need as many client_rev if there are numbers, if not then I need the largest letter.

    How can I achieve this requirement?

    Kind regards.

    Hello

    What do you mean by "the decision must be the minor doc_date?
    It would be useful that you posted your desired results.
    I assume you mean you want only the line with the doc_date lowest (for each doc_no).
    in other words, the desired results are:

        DOC_NO L DOC_DESC           DOC_DATE
    ---------- - ------------------ ---------
           240 2 Description of 240 01-JAN-09
           241 D Description of 241 01-FEB-09
    

    Here's a way to get these results:

      SELECT x.doc_no, x.last_client_rev, y.doc_desc, y.doc_date
      FROM     (     -- Begin sub-query based on table_a
         SELECT   doc_no,
                     MAX (client_rev) KEEP
                       (DENSE_RANK LAST ORDER BY TRANSLATE(client_rev
                                                           ,'ABCD012' -- Desired sort order
                                                           ,'012ABCD'  -- Actual sort order
                                                          )) AS last_client_rev
         FROM       table_a
            GROUP BY  doc_no
         ) x,
         (     -- Begin sub-query based on table_b
         SELECT       doc_no,
                MAX (doc_desc) KEEP (DENSE_RANK FIRST ORDER BY doc_date)
                             AS doc_desc,
                MIN (doc_date)     AS doc_date
         FROM       table_b
         GROUP BY  doc_no
         ) y
      WHERE x.doc_no = y.doc_no;
    

    As you restrict the table_a lines are used, so now you restrict table_b lines are used.

    First, let's review what you do with table_a.
    Table_a has multiple lines with the same doc_no.
    You only want to consider one of these lines: one that comes last, when to sort your particular way.
    If your main query does not use the table_a:
    It uses a subquery table_a-based which is a GROUP BY doc_no, to ensure that only the row by doc_no is used.

    Now, what is the problem with table_b?
    Table_b has as many rows with the same doc_no.
    You only want to consider one of these lines: the one with the lowest doc_date.
    So your main query should not use table_b:
    She must use a subquery table_b-based which is a GROUP BY doc_no, to ensure that only the row by doc_no is used.

  • char ASCII value

    I don't know how to get a HEXADECIMAL character value, but I want to know how to get the character of its HEX value.  that is to say: I am 41 and I want to convert that "a."  Is there a way to do this?

    Thanks for your help.

  • Conversion of NULL values to 0 in graphics

    Hello again everyone,

    I use Oracle Business Intelligence 11.1.1.7.131017.

    In our chart, we have 2 lines with made cumulative information, but whenever this information is equal to 0, it will not draw the line, only for items > 0.

    I tried to change the data format to: #0;-#; 0 but it does not work...

    Although the table indicates 0 where NULL values are supposed to be, when he tries to draw the graph, the line appears only for values > 0...

    Is it possible to convert NULL values to 0 in graphics?

    Thanks a lot for all the help and have a nice day!

    Kind regards

    Frederico Barracha.

    Hi Fred,.

    It's not because you have NULL values in the table. This is because there is no entry in the warehouse.

    For example, you wise date data for March 1 to March 5. in this March 4 isn't any data in the table. That is to say, there is no entry for March 4. In this case, you can see graphs broken. You can follow one of the below approach.

    Combine a similar request and add the column date dimension of time where all date entries are there and all the other Null columns. It will be visible from the graph in uninterrupted.

    Another thing to do is cross join with a date column so that the data will come for all dates.

  • Character with the ascii value '0' does not not in NVL...

    Hello

    I have a question, work with "Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi" as our Source and target. For a record in the nvl (COLUMN, 'AA') target is back 'AA' but the same matching record in the source: nvl (COLUMN, 'AA') returns nothing (a data field where nothing is there), why what is happening? Every point of view...

    Basically you have a CHR (0) in the column. And CHR (0) is not a NULL value. So its obvious NVL will not return AA.

    It could be interesting to ask Tom "Strange Chr (0) '

    See also this

    SQL > create table t
    2 as
    3 select cast (chr (0) as varchar2 (30)) c
    4 double;

    Table created.

    SQL > t desc;
    Name Null?    Type
    ---------------------- -------- ------------------------
    C VARCHAR2 (30)

    SQL > select c from t;

    C
    ------------------------------

    SQL > select nvl (c, 'a') t;

    NVL (C, 'A')
    ------------------------------

    SQL > select dump t (c);

    DUMP (C)
    ------------------------------
    Typ = 1 Len = 1:0

    SQL > select nvl (replace (c, chr (0)), 'a') t;

    NVL (REPLACE (C, CHR (0)), 'A')
    ------------------------------
    one

    SQL >

  • Help with query - Conversion of the value of the line to the value of the column for the same column

    CREATE TABLE TESTY
    (
      BATCH_ID  VARCHAR2(100 BYTE),
      LINE_NUM  NUMBER,
      STRING    VARCHAR2(100 BYTE),
      AMOUNT    NUMBER
    )
    /
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DBA', 1, '101-201', 100)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DBA', 1, '101-202', 200)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-201', 110)
    
    /
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-202', 210)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-203', 310)
    /
    COMMIT
    /
    
    BATCH_ID     LINE_NUM     STRING     AMOUNT
    DBA          1          101-201     100
    DBA          1          101-202     200
    DEVELOPER     2          101-201     110
    DEVELOPER     2          101-202     210
    DEVELOPER     2          101-203     310
    
    Required Output 
    
    BATCH_ID     LINE_NUM  AMOUNT1 AMOUNT2
    DBA          1         100     200
    DEVELOPER    2         110     210
    Only need to this result for string IN (101-201', 101-202').

    Can anyone help. ?

    Thank you

    Hello

    In Oracle 8.1 or more

    SELECT       batch_id, line_num
    ,       SUM (CASE WHEN string = '101-201' THEN amount END)     AS amount1
    ,       SUM (CASE WHEN string = '101-202' THEN amount END)     AS amount2
    FROM       testy
    GROUP BY  batch_id, line_num
    ORDER BY  batch_id, line_num
    ;
    

    From Oracle 11.1, you can also use SELECT... PIVOT.
    For more information, see the FAQ forum {message identifier: = 9360005}

  • How to check an ascii value of the character in the string

    Hi all
    I have a string that contain alphanumeric values.
    I want only numeric values in this string.
    FRO this purpose.
    I created a varry
    TYPE tab IS VARRAY(10) OF VARCHAR2(10) ;
       var tab
    ;
    variable var of type varray contain this string

    and now I want to check each character in this string at end of validation

    How can I check this particular string

    can I use loop?

    Hello

    If str is a string, then

    REGEXP_LIKE ( str
                , '^[[:digit:]]+$'
                )
    

    Returns TRUE if and only if str contains digits (0 ith 9) and nothing else.
    Here's a way you can use REGEXP_LIKE in PL/SQL:

    SET     SERVEROUTPUT     ON
    
    DECLARE
        str          VARCHAR2 (10)     := '123.4';
    BEGIN
        IF  REGEXP_LIKE ( str
                      , '^[[:digit:]]+$'
                  )
        THEN
         dbms_output.put_line (  str
                        || ' is all digits.'
                        );
        ELSE
         dbms_output.put_line (  str
                        || ' contains something besides digits, or is NULL'
                        );
        END IF;
    END;
    /
    

    Published by: Frank Kulash, December 12, 2011 09:13
    Added PL/SQL example

  • Stop the conversion of the value E

    Hey guys,.

    It wasn't a problem before, but since I updated to Flex 4.5.  All my e-values are 0 when displayed but when ColdFusion is passed to the Flex application they are in scientific notation.  I even tried to pack the values in single quotes, in the hope that they will be treated as a String, but the result is always zero. Nothing to prevent this.  Results are displayed in a sortable DataGrid and I understand I have to write a custom sort function, but a new one somewhere else.

    Process:

    Init search-> CF function call

    CF runs a query and creates a custom structure (E-values in scientific notation)

    CF returns Struct to Flex (E-value are in scientific notation verified in the tab of network in Flash Player monitor response 4)

    Flex assigns event.result to collection ArrayCollection (rated displayed in alert is zero)

    Collection ArrayCollection is attributed to DataGrid.dataProvider

    E value displayed in the DataGrid column is zero

    Thanks for your help (excuse the spelling nor grammar mistakes)

    Jay

    I've reconfigured my data Service to run string instead of a number.   This seems to have done the trick.

Maybe you are looking for

  • a anonymox reliable enough to "Enter anonymox.profiles as a filter"?

    I have a bug and here are the instructions they have given to me "First you must reset your profiles. This step is fundamental and a technique of the bit please do the following:1.) Open advanced settings Firefox by typing about: config in the URL/ad

  • Elite x 3: update of HP Elite x 3

    Current device information: Build of the OS: 14393.321 Firmware: 0002.0000.0007.0088 Received a notification in settings > update & Security > phone update for a new update today (10/25), which requires a reboot, but the phone goes into a mode does n

  • ... Rumors about the M9600T motherboard?

    First... I'm definitely a 'NewBie' on this HP FORUM! Due to health problems, I'm sitting 3 years with my brother Geekish... gift a HP m9600t (renovated). Recently, I tried to get him on the line as a replacement for my old and less powerful PC DeskTo

  • Easiest way to convert Hex in full

    This problem is mainly to do with a hexadecimal string of full conversion.  The device, connected via a series output in the format 0A 00 hex connection, when he looking at in hexadecimal.  The first two digits correspond to the data, the last two ar

  • My keyboard does not work on my Aspire E13, I have windows 10.

    I tried to uninstall and reinstall the driver, this makes no difference.