Char conversion

Please sent me immediately when u get this mssg;;;;;
Is there any methods like Integer.parseInt() for converting a String to charecter?
Or plz send me a way to read charecter as commandline argument so that it can be used in Switch().

You could use method from String class toCharArray().
     String s = "my string";
      char [] charray = s.toCharArray();

Similar Messages

  • HEX to CHAR conversion in ECC 6.0

    Hi All,
    We have upgraded the client system from 4.6C to ECC 6.0. In one of the program the code was as below:
    c_code1(1) TYPE x VALUE '23',
    c_code2(1) TYPE x VALUE 'E1'.
    i_uml-uml = c_code1.
      APPEND i_uml.
      i_uml-uml = c_code2.
      APPEND i_uml.
    LOOP AT i_uml INTO w_char.
        SEARCH  i_rab_tab FOR w_char.
        IF sy-subrc = 0.                         
          MOVE 'X' TO w_found.
          EXIT.
        ENDIF.
      ENDLOOP.
    Here c_code1 and c_code2 are declared as hex and assigned 23 and E1. These codes are moved to itab i_umi. These valuse are assigned to w_char.
    When assigned to w_char, the hex value of 23 is converted to '#' and E1 is converted to 'ä'.
    Above logic is working in 4.6 but not working in ECC 6.0. The conversion of HEX to char is not working in 6.0. In ECC 6.0, when hex number 23 is assigned to w_char, it takes value as '2'.
    Please suggest me how can I make it work in ECC.
    Thanks in advance.
    regards,
    Gaurav

    Hi,
         Try with the below Z report by Changing the values for VALUE in  the below report and execute it you can get the hexadecimal conversion,
    data :  i1 type xstring,
            i2 type string,
            i3 type x.
    parameters: value like i3.
    i1 = value.
    CALL FUNCTION 'NLS_STRING_CONVERT_TO_SYS'
      EXPORTING
        lang_used                   = sy-langu
        source                      = i1
      FROM_FE                     = 'MS '
    IMPORTING
       RESULT                      = i2
      SUBSTED                     =
    EXCEPTIONS
       ILLEGAL_SYST_CODEPAGE       = 1
       NO_FE_CODEPAGE_FOUND        = 2
       COULD_NOT_CONVERT           = 3
       OTHERS                      = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    write: i2.
    Thank U,
    Jay....

  • Char conversion problem

    Hi all
    in the following query:
    select to_date('31-JUL-12', 'dd-MON-yy') res from dual;we have error:
    ORA-01843: not a valid month
    01843. 00000 -  "not a valid month"
    *Cause:   
    *Action:...this is the first strange error/for me :) /...
    After this conversion - i want to convert it to char.
    Expected output:
    2012/07/31 00:00:00Any ideas?
    Version: 11g
    Thanks in advance,
    Bahchevanov.

    bahchevanov wrote:
    Hi all
    in the following query:
    select to_date('31-JUL-12', 'dd-MON-yy') res from dual;we have error:
    ORA-01843: not a valid month
    01843. 00000 -  "not a valid month"
    *Cause:   
    *Action:...this is the first strange error/for me :) /...
    After this conversion - i want to convert it to char.
    Expected output:
    2012/07/31 00:00:00Any ideas?
    Version: 11g
    Thanks in advance,
    Bahchevanov.post results from following SQL
    select to_char(sysdate-1,'YYYY-MON-DD') FROM DUAL;

  • String to char conversion

    How do I convert a string I have (I am sure its one character) in to char?

    you must mean char foo, instaead of String!
    char foo = "bar".toCharArray()[0];

  • Very simple Char* conversion operator not working

    This should be simple, but it's not working.  The code below gives me a compiler error:
    Error 2 error C2440: 'initializing' : cannot convert from 'Foo' to 'char *' 
    class Foo
     char * _data;
    public:
     operator const char * () { return _data; }
     Foo f;
     char * bar = f;
    char*_data;
    public
    operatorconstchar*(){return_data;}
    Eric Jorgensen http://www.ericjorgensen.com

    On 3/5/2015 12:26 AM, "Eric Jorgensen" wrote:
    This should be simple, but it's not working.  The code below gives me a compiler error:
    Error 2 error C2440: 'initializing' : cannot convert from 'Foo' to 'char *'
    Foo can be converted to const char*, but not to char*
    Igor Tandetnik

  • Char conversion to number

    Hai all,
    I have a colmn called Kilometers in table of datatype varchar and has got morethan 20,000 numeric records in it.. only numbers are getting stored in that column.. now am creating one more table with column called kiometres with datatype number..
    I want to insert the records of table A.Kilometres to B.Kilometres.. I tried the follwoing :
    insert into project_mileage (kilometres) select (to_number(kilometres,'9999999')) from project
    am getttin the error :
    ora-01722. invalid number.
    how can I get the records inserted..
    Thanks
    Kai

    If your data doesn't include other characters but numbers, you could rely on the implicit datatype conversion:
    SQL> create table a(a varchar2(3));
    Table created.
    SQL> create table b(b number(3));
    Table created.
    SQL> insert into a values ('1');
    1 row created.
    SQL> insert into a values ('2');
    1 row created.
    SQL> insert into a values ('3');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into b select * from a;
    3 rows created.
    SQL> commit;
    Commit complete.
    SQL> select * from b;
             B
             1
             2
             3
    SQL>~ Madrid

  • CHAR conversion to NUM.

    dear all,
    in BI7, how can i convert my CHAR into NUM datatype? data from external source is coming in as CHAR and i want to change it to type NUM. how can i do that in the update rule? thanks.

    Hi,
       Do Type casting to convert the CHAR into NUM datatype.
    Let's say,
    l_var1 --> Source variable in CHAR
    l_var2 --> Target variable in NUM
    Create a temporary variable variable l_temp as Type NUM.
    Make sure that l_var1 does not have any non-numeric values. Do a check for that.
    IF l_var1 CONTAINS ( 0,1,2,3,4,5,6,7,8,9 )
         l_temp = l_var1 (Type Casting)
         l_var2 = l_temp.
    ENDIF.
    This will work out.
    Regards,
    Balaji V

  • How to find data dictionary and oracle schema tables for UTF8 char conversi

    I am doing UTF8 char conversition, i got lot of convertable objects,as per document we don't need to worry about data dictionary objects and how to find data dictionary and oracle schema objects for UTF8 char conversition.
    USER.TABLE Convertible Truncation Lossy
    MDSYS.OPENLS_NODES 17 0 0
    MDSYS.SDO_COORD_OP_PARAM_VALS 200 0 0
    MDSYS.SDO_GEOR_XMLSCHEMA_TABLE 1 0 0
    MDSYS.SDO_STYLES_TABLE 78 0 0
    MDSYS.SDO_XML_SCHEMAS 3 0 0
    ORDDATA.ORDDCM_CT_PRED_OPRD 51 0 0
    ORDDATA.ORDDCM_DOCS 9 0 0
    ORDDATA.ORDDCM_MAPPING_DOCS 1 0 0
    SYS.METASTYLESHEET 178 0 0
    SYS.REGISTRY$ERROR 2 0 0
    SYS.RULE$ 21 0 0
    SYS.SCHEDULER$_EVENT_LOG 182 0 0
    SYS.WRH$_SQLTEXT 2,099 0 0
    SYS.WRH$_SQL_PLAN 1,736 0 0
    SYS.WRI$_ADV_ACTIONS 5,452 0 0
    SYS.WRI$_ADV_DIRECTIVE_META 5 0 0
    SYS.WRI$_ADV_OBJECTS 2,278 0 0
    SYS.WRI$_ADV_RATIONALE 9,594 0 0
    SYS.WRI$_ADV_SQLT_PLANS 455 0 0
    SYS.WRI$_ADV_SQLT_PLAN_STATS 288 0 0
    SYS.WRI$_DBU_FEATURE_METADATA 188 0 0
    SYS.WRI$_DBU_FEATURE_USAGE 16 0 0
    SYS.WRI$_DBU_HWM_METADATA 20 0 0
    SYS.WRI$_REPT_FILES 27 0 0
    XDB.XDB$DXPTAB 2 0 0
    XML CSX Dictionary Tables:
    USER.TABLE Convertible Truncation Lossy
    Application Data:
    USER.TABLE Convertible Truncation Lossy
    APPLSYS.BISM_OBJECTS 4 0 0
    APPLSYS.DR$FND_LOBS_CTX$I 0 103 1,260,883
    APPLSYS.FND_CONC_PROG_ANNOTATIONS 272 0 0
    APPLSYS.FND_OAM_CONTEXT_FILES 15 0 0
    APPLSYS.FND_OAM_DOC_LINK 1 0 0
    APPS.FND_OAM_CONTEXT_FILES_1 6 0 0
    AZ.AZ_APIS 11 0 0
    AZ.AZ_SELECTION_SET_ENTITIES_B 48 0 0
    ECX.ECX_DTDS 205 0 0
    ECX.ECX_FILES 91 0 0
    IBC.IBC_ATTRIBUTE_BUNDLES 41 0 0
    JTF.JTF_HEADER_DTD 1 0 0
    JTF.JTF_MESSAGE_OBJECTS 82 0 0
    JTF.JTY_TRANS_USG_PGM_SQL 29 0 0
    ODM.ODM_PMML_DTD 1 0 0
    OKC.OKC_REPORT_SQL_B 3 0 0
    OKC.OKC_REPORT_SQL_TL 2 0 0
    OKC.OKC_REPORT_XSL_TL 5 0 0
    XDP.XDP_PROC_BODY 10 0 0
    [Distribution of Convertible, Truncated and Lossy Data by Column]
    Data Dictionary Tables:
    USER.TABLE|COLUMN Convertible Truncation Lossy
    MDSYS.OPENLS_NODES|SYS_NC00004$ 17 0 0
    MDSYS.SDO_COORD_OP_PARAM_VALS|PARAM_VALUE_FILE 200 0 0
    MDSYS.SDO_GEOR_XMLSCHEMA_TABLE|XMLSCHEMA 1 0 0
    MDSYS.SDO_STYLES_TABLE|DEFINITION 78 0 0
    MDSYS.SDO_XML_SCHEMAS|XMLSCHEMA 3 0 0
    ORDDATA.ORDDCM_CT_PRED_OPRD|SYS_NC00004$ 51 0 0
    ORDDATA.ORDDCM_DOCS|SYS_NC00005$ 9 0 0
    ORDDATA.ORDDCM_MAPPING_DOCS|SYS_NC00007$ 1 0 0
    SYS.METASTYLESHEET|STYLESHEET 178 0 0
    SYS.REGISTRY$ERROR|MESSAGE 1 0 0
    SYS.REGISTRY$ERROR|STATEMENT 1 0 0
    SYS.RULE$|CONDITION 21 0 0
    SYS.SCHEDULER$_EVENT_LOG|ADDITIONAL_INFO 182 0 0
    SYS.WRH$_SQLTEXT|SQL_TEXT 2,099 0 0
    SYS.WRH$_SQL_PLAN|OTHER_XML 1,736 0 0
    SYS.WRI$_ADV_ACTIONS|ATTR5 2,726 0 0
    SYS.WRI$_ADV_ACTIONS|ATTR6 2,726 0 0
    SYS.WRI$_ADV_DIRECTIVE_META|DATA 5 0 0
    SYS.WRI$_ADV_OBJECTS|ATTR4 2,278 0 0
    SYS.WRI$_ADV_RATIONALE|ATTR5 9,594 0 0
    SYS.WRI$_ADV_SQLT_PLANS|OTHER_XML 455 0 0
    SYS.WRI$_ADV_SQLT_PLAN_STATS|OTHER 288 0 0
    SYS.WRI$_DBU_FEATURE_METADATA|INST_CHK_LOGIC 21 0 0
    SYS.WRI$_DBU_FEATURE_METADATA|USG_DET_LOGIC 167 0 0
    SYS.WRI$_DBU_FEATURE_USAGE|FEATURE_INFO 16 0 0
    SYS.WRI$_DBU_HWM_METADATA|LOGIC 20 0 0
    SYS.WRI$_REPT_FILES|SYS_NC00005$ 27 0 0
    XDB.XDB$DXPTAB|SYS_NC00006$ 2 0 0
    XML CSX Dictionary Tables:
    USER.TABLE|COLUMN Convertible Truncation Lossy
    Application Data:
    USER.TABLE|COLUMN Convertible Truncation Lossy
    APPLSYS.BISM_OBJECTS|SYS_NC00023$ 4 0 0
    APPLSYS.DR$FND_LOBS_CTX$I|TOKEN_TEXT 0 103 1,260,883
    APPLSYS.FND_CONC_PROG_ANNOTATIONS|PROGRAM_ANNOTAT 272 0 0
    APPLSYS.FND_OAM_CONTEXT_FILES|TEXT 15 0 0
    APPLSYS.FND_OAM_DOC_LINK|DOC_LINK_INFO 1 0 0
    APPS.FND_OAM_CONTEXT_FILES_1|TEXT 6 0 0
    AZ.AZ_APIS|FILTERING_PARAMETERS 11 0 0
    AZ.AZ_SELECTION_SET_ENTITIES_B|FILTERING_PARAMETE 48 0 0
    ECX.ECX_DTDS|PAYLOAD 205 0 0
    ECX.ECX_FILES|PAYLOAD 91 0 0
    IBC.IBC_ATTRIBUTE_BUNDLES|ATTRIBUTE_BUNDLE_DATA 41 0 0
    JTF.JTF_HEADER_DTD|HEADER_DTD 1 0 0
    JTF.JTF_MESSAGE_OBJECTS|BUS_OBJ_DTD 41 0 0
    JTF.JTF_MESSAGE_OBJECTS|BUS_OBJ_SQL 41 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|BATCH_DEA_SQL 1 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|BATCH_INCR_SQL 5 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|BATCH_TOTAL_SQL 6 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|INCR_REASSIGN_SQL 5 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|REAL_TIME_INSERT 6 0 0
    JTF.JTY_TRANS_USG_PGM_SQL|REAL_TIME_SQL 6 0 0
    ODM.ODM_PMML_DTD|DTD 1 0 0
    OKC.OKC_REPORT_SQL_B|SQL_TEXT 3 0 0
    OKC.OKC_REPORT_SQL_TL|HELP_TEXT 2 0 0
    OKC.OKC_REPORT_XSL_TL|HELP_TEXT 2 0 0
    OKC.OKC_REPORT_XSL_TL|XSL_TEXT 3 0 0
    XDP.XDP_PROC_BODY|PROC_BODY 10 0 0
    -------------------------------------------------- ---------------- ---------------- ----------------

    Hi;
    Please run below query which could be helpful for your issue:
    select * from dictionary where TABLE_NAME LIKE '%NLS%'
    select * from dictionary where TABLE_NAME LIKE '%GLOBAL%'
    Regard
    Helios

  • Ascii - char conversion

    What is the easiest way to convert from an ascii value to its corresponding char? I want to make a table of the unicode character set from values 32 to 126 with simple for loop. The only thing I could find online was String.fromCharCode() which didn't work since it's javascript.

    What is the easiest way to convert from an ascii value
    to its corresponding char? I want to make a table of
    the unicode character set from values 32 to 126 with
    simple for loop. The only thing I could find online
    was String.fromCharCode() which didn't work since it's
    javascript.The first 128 characters of all unicode character sets corresponds exactly to ASCII.
    For UTF-8....
    x00 => x00
    x01 => x01
    x7f => x7f
    For a 16 bit unicode charset it would be...
    x00 => x0000
    x01 => x0001
    x7f => x007f

  • CURR to CHAR conversion

    Below is my problem :
    TYPES: BEGIN OF SOI_GENERIC_ITEM,
             ROW(4) TYPE C,
             COLUMN(4) TYPE C,
             VALUE(256) TYPE C,
           END OF SOI_GENERIC_ITEM.
    data:
    wa_cell_data TYPE soi_generic_item,
    purch_pc type  TPM_AMOUNT (of curr21 type).
    when i move value from PURCH_PC TO WA_CELL_DATA-VALUE -
    no value appears . Kindly help.
    Thanks,
    Sri

    Hi Sri,
    The problem is with the Length of ur Target field which is of 256 Chars ..
    You check this code... It is working fine. Hope this will be the perfect solution for u.
    TYPES: BEGIN OF SOI_GENERIC_ITEM,
    ROW(4) TYPE C,
    COLUMN(4) TYPE C,
    VALUE(256) TYPE C,
    END OF SOI_GENERIC_ITEM.
    data:
    wa_cell_data TYPE soi_generic_item,
    purch_pc type TPM_AMOUNT VALUE '123.45-'.
    <b>WRITE PURCH_PC TO WA_CELL_DATA-VALUE LEFT-JUSTIFIED.</b>
    WRITE: WA_CELL_DATA-VALUE.
    <b>Reward points if Helpful</b>

  • Hexa to char conversion

    Hi Experts,
    I am trying to convert hexa decimal value 1D to char value GS. I tried using the FMs <b>NLS_STRING_CONVERT_TO_SYS</b> and <b>stpu1_hex_to_char</b> but I did not get GS as output instead it was ##.Please suggest me the solution for this.
    Points will be rewarded.
    Thanks,
    Nagesh

    Hi Nagesh,
    You can use the following code to get the char value of the hex value.
    TRY.
    CALL METHOD CL_ABAP_CODEPAGE=>CONVERT_FROM
      EXPORTING
        SOURCE      = xstr
        CODEPAGE    = `UTF-8`
       ENDIAN      =
       REPLACEMENT = '#'
       IGNORE_CERR = ABAP_FALSE
      RECEIVING
        RESULT      = char
    CATCH CX_PARAMETER_INVALID_RANGE .
    CATCH CX_SY_CODEPAGE_CONVERTER_INIT .
    CATCH CX_SY_CONVERSION_CODEPAGE .
    CATCH CX_PARAMETER_INVALID_TYPE .
    ENDTRY.
    This will work for normal characters. But GS (Group Separator) is a special character, it will return "#" only..
    We were also facing this issue. So we decided to take a decision depending on the Hex value itself.
    If you find any mechanism to solve this problem, do let me know.
    ~ ramanath.

  • Unzip char conversion problems

    Hi everyone.
    I've got a zipped .txt that i unzip ussing PayloadZipBean module. It works fine but my problem is that i get some rare characters.
    Instead of á or ó or ì, i get a ? or # and so long.
    Does anybody know how to keep 'original' characters?
    Regards,
    Inigo.

    Hi Stefan.
    I receive an attachment in a sender webservice. This attachment is a ZIP file that contains a TXT file inside.
    What i have in file receiver adapter is :
    localejbs/AF_Modules/PayloadSwapBean          Local Enterprise Bean     transform
    localejbs/AF_Modules/PayloadZipBean              Local Enterprise Bean     zip
    localejbs/AF_Modules/MessageTransformBean   Local Enterprise Bean    contentType
    CallSapAdapter                                                Local Enterprise Bean    0
    ************************************************************************************++++
    transform        swap.keyName           payload-name
    transform        swap.keyValue           attachment-1
    zip                 zip.mode                    unzip
    contentType   Transfer.ContentType   text/plain;charset="ISO-8859-1"
    With this, i still haven't got the correct characters (á, é, í, ó, ú, ò, è and so long)
    Kind regards,
    Inigo.

  • Floating to char conversion

    Hi,
    I am fetching the floating value (AUSP-ATFLV) and I am storing that value into local variable in my Program.  For example if AUSP-ATFLV contains value like 8.0000000000000000E+02 but I need to store this to 800 in my variable. So how to declare the variable I mean what type and what length I have to use for changing the above float value to 800. Please help me.
    Thanks.

    Hi Babji..
    You can declare a Variable of type P.
    DATA : V_PACK(10) TYPE P DECIMALS 2.
    DATA : V_FLOAT TYPE F VALUE '800'.
    MOVE V_FLOAT TO V_PACK.
    WRITE:/ V_FLOAT, V_PACK.
    <b>
    Reward if Helpful.</b>

  • Hebrew Characters...Chars display as junk after import from 8i to 10g

    Gurus,
    I have a problem with a customer upgrade...
    Background of the issue... the customer is an Agile PLM customer of version 8.5 (Agile PLM version 8.5). The database was hosted on oracle 8i. He is intending to upgrade from Agile 8.5 to Agile 9.2.2.4. During this process he has upgraded he db from Agile 8.5 to Agile 9.2.2.4, and has also shifted the DB platform from 8i to 10g.
    Problem: There were hebrew characters entered in Varchar2 columns (Oracle 8i), which after upgrade are not displaying correctly. Newly entered hebrew characters after upgrade display correctly in UI...
    Customer DB Parameters : The nls parameters on the source db before upgrade(8i) are American_America.WE8ISO8859P1, and the destination db parameters are American_America.UTF8.
    What i have done to deal with the issue: i have tried exporting the db using UTF8 and importing the db to 10g on UTF8, but still the characters show as garble characters..., have tried various options of exporting/importing using the combinations of WE8ISO8859P1 char set as well as IW8ISO8859P8 charsets, as i have learnt during my research abt the charsets that Hebrew Characters are supported in IW8ISO8859P8 charset and not WE8ISO8859P1. My suspicion here is that the problem is with the export and import from 8i to 10g, and the Char conversion which is happening during this process..(this is my guess and i might be wrong tooo...)
    Currently this is a hot issue with the customer, and needs an immediate fix (to display the Hebrew characters properly after upgrade)
    I am a layman on the NLS Settings and couldnt figure out what else to do....I would request all the Gurus out there to help us figure out the problem and try resolve it...
    Thanks for your Help in Advance
    Regards,
    Raja.

    Hebrew characters aren't supported using the ISO 8859-1 character set. In the original system, what must be happening is that the NLS_LANG on the client matches the database character set, which tells the Oracle client not to do character set conversion. This causes Oracle to treat character data just as a binary data stream and to store whatever bits the client sends. So long as the client is really sending ISO 8859-8 data, telling Oracle it is ISO 8859-1, and on the return side asking Oracle for ISO 8859-1 and treating it internally as ISO 8859-8 while Oracle is doing no character set conversions, this will appear to work. But the data in the database is fundamentally wrong. You can configure things so that you can, apparently, store Chinese data in a US7ASCII database using this sort of approach, but you end up with screwed up data.
    This sort of problem usually comes to light when you start using tools (like export) that don't know how to mis-identify the data they are sending and retrieving like your application is doing or when character set conversion is necessary. Since the data in the database isn't valid ISO 8859-1, Oracle has no idea how to translate it to UTF8 properly.
    As previously suggested, the safest option is to move the data with a solution that replicates the behavior of the application. So
    - Set the client NLS_LANG to match the database character set (WE8ISO8859P1)
    - Extract the data to a flat file using SQL*Plus or a C/C++ application
    - This data file will, presumably, really be ISO 8859-8 encoded
    - Use SQL*Loader to load the data into the UTF8 database, specifying the actual character set (ISO 8859-8) in the control file.
    If you're rather more adventurous and working with Oracle Support, it is potentially possible to change the character set of the source database from ISO 8859-1 to ISO 8859-8 and then export and import will work properly. But this would require some undocumented options that shouldn't be used without Oracle Support being involved and introduces a number of risks that the flat file option avoids.
    Justin

  • Performance question when compare date with date or char with char

    Hello from Germany (Frankfurt) !
    I am working on Oracle 9.2.0.8.0
    and have to solve following problem:
    Comparison of a date and char fields.
    Now two ways to do it.
    Either I compare char with char and convert date to char,
    or I compare date with date and convert char to date.
    Now the performace question. Which operation takes more effort for the database?
    So why not to try and to see the results?
    First create table:
    CREATE TABLE TEST (
    char_date VARCHAR2(8),
    real_date DATE
    NOLOGGING;
    Then insert 1.000.000 rows
    BEGIN
    for x in 1..1000000
    loop
    insert into test (char_date, real_date) VALUES('19990101', TO_DATE('2006.01.01', 'YYYY.MM.DD'));
    end loop;
    COMMIT;
    END;
    Collect statistics
    EXEC dbms_stats.gather_table_stats('TESTER', 'TEST');
    Now run some selects for date to char conversion:
    Elapsed: 00:00:00.00
    SQL> select * from test t where TO_DATE(char_date, 'YYYYMMDD') > real_date;
    no rows selected
    Elapsed: 00:00:03.02
    SQL> select * from test t where TO_DATE(char_date, 'YYYYMMDD') > real_date;
    no rows selected
    And some selects for char to date conversion:
    Elapsed: 00:00:03.02
    SQL> select * from test t where char_date > TO_CHAR(real_date, 'YYYYMMDD');
    no rows selected
    Elapsed: 00:00:02.05
    SQL> select * from test t where char_date > TO_CHAR(real_date, 'YYYYMMDD');
    no rows selected
    Elapsed: 00:00:02.05
    SQL>
    As you see when I compare char with char and convert date to char it seems to be faster (almost 1 second)
    Is the test correct?
    I still not sure, what gets better performance...
    Any idea?
    Thanks!

    Depends on whether you want the right results or not.
    Why don't you run the following two queries and see if the difference in results tells you anything?:
    with t as (select to_date('01/02/2007', 'dd/mm/yyyy') date_col from dual
               union all
               select to_date('02/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/03/2006', 'dd/mm/yyyy') from dual)
    select *
    from   t
    where  date_col < to_date('04/03/2006', 'dd/mm/yyyy');
    with t as (select to_date('01/02/2007', 'dd/mm/yyyy') date_col from dual
               union all
               select to_date('02/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/03/2006', 'dd/mm/yyyy') from dual)
    select *
    from   t
    where  to_char(date_col) < '04/03/2006';

Maybe you are looking for

  • Sending An Error Message as Status Message

    Hi, I have a selection screen which was (Object Oriented program ) defined through Function Group and calling via Function Module. when the transaction Starts with selection Screen and we have few buttons on the selection screen, when we enter data a

  • I did my ios7 update and lost all my old text messages, how do I get them back?

    I did my ios7 update and lost all my old text messages, how do I get them back?

  • UpdateXML for non-existing attribute

    Hello bellow are data for a sreange looking (for me) behaviour of updateXML. Usually (i mean other languages) setting an xml node attribute causes attribute creation if it does not exist. Here obviously that is not the case. Q: Why and is it possible

  • CRM BP Related Tables

    Dear Friends Can anyone please send me BP related Tables to me? either here or by E-mailing me plzz... My e-mail ID is [email protected] Many thannks and regards, Lata.

  • ISCSI Initiator for Mac OS 10.8

    Hello everyone! I need an iSCSI Initiator for Mac OS 10.8. Are there any suggestions? I've tried globalSAN, but it seems to be too expensive. Can you advise something?