Char to float conversion

Hi,
I am holding float value in a variable which i want to convert it into float again.
Help Will be rewarded

hi,
u can take a float variable and move char into it directly.
float1 = char1.

Similar Messages

  • Convert Char to float

    Hi all,
    Am wanting to convert a char value (the infoobject is defined as NUMC) into float in order to perform a calculation in the FOX formula. It would not allow the char value to be stored into a float variable...comes back wz an error message - Types of operands F and <infoobject_numc> do not agree.
    Any ways of doing this? I thought about using a function to perform the conversion from char to float format but dont knw if such a function exists on the BI system?
    Thanks!

    Hi,
    I sometimes use a local variable of type STRING to pass on values to other data types:
    DATA local type STRING.
    local = A.
    B = local.
    But I'm not sure it will work for you. If not, you can do it with an exit function.
    D

  • Char to Date conversion problem - again!

    Hi,
    in order to make date selection 'more attractive' for end users I have been tasked with presenting a text field with 'January 2010', 'February 2010' etc to the end users for their prompts.
    So far so easy...
    However, I then need to use the values to derive either dates, or years, or date numbers.
    This all works fine during development when I am testing using a default parameter thus; -
    '@{MYMONTHYEAR}{September 2010}' - which is fed into various very complex functions.
    BUT - when I try to use the report in conjunction with the parameter I get; -
    'The evaluation of the index 6 expression on row count -1 failed. [nQSError: 46046] Datetime value 2010/09/01 does not match the specifiied format'
    However, cast('2010/09/01' as date) works fine... and convoluted as the logic of my functions is, the fundamental char to date conversion is exactly in this format.
    Anyone shed any light on this, give me a guaranteed way to handle char to date conversion?
    thanks,
    Robert.

    Hi,
    I tried your workaround case when 1=2... but I still get the same error....
    Not when I have the format from my default value, but when I get the value from a dashboard prompt in a page.
    The full error is; -
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46046] Datetime value 2012/09/01 does not match the specified format. (HY000)
    SQL Issued: SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11, s_12, s_13, s_14, s_15, s_16, s_17, s_18, s_19, s_20, s_21, s_22, s_23, s_24, s_25, s_26, s_27, s_28, s_29, s_30, s_31, s_32, s_33, s_34, s_35, s_36, s_37, s_38, s_39, s_40, s_41, s_42, s_43, s_44, s_45, s_46, s_47, s_48, s_49, s_50, s_51, s_52, s_53, s_54, s_55, s_56, s_57 FROM ( SELECT 0 s_0, "Vivaldi Detail"."Product Global Hierarchy"."Tobacco Category Groups" s_1, "Vivaldi Detail"."Product Global Hierarchy"."Tobacco Category" s_2, "Vivaldi Detail"."Product Global Hierarchy"."Total Tobacco Products" s_3, FILTER("Vivaldi Detail"."Fact Sales Detail"."SOM %" USING ("Vivaldi Detail"."Time"."Year" =cast((cast(right('September 2012',4) as integer)-1) as char(4)))) s_4, FILTER("Vivaldi Detail"."Fact Sales Detail"."SOM %" USING ("Vivaldi Detail"."Time"."Year" =cast((cast(right('September 2012',4) as integer)-2) as char(4)))) s_5, FILTER("Vivaldi Detail"."Fact Sales Detail"."SOM %" USING ("Vivaldi Detail"."Time"."Year" =cast((cast(right('September 2012',4) as integer)-3) as char(4)))) s_6, FILTER(FILTER("Vivaldi Detail"."Fact Sales Detail"."SOM %" USING ("Vivaldi Detail"."Time"."Year" =cast((cast(right('September 2012',4) as integer)-1) as char))) USING "Vivaldi Detail"."Time"."Month Number" <=month(CASE WHEN 1=2 THEN CURRENT_DATE ELSE cast(right('September 2012',4)||'/'||CASE left('September 2012',LOCATE(' ','September 2012')-1) WHEN 'January' THEN '01/01' WHEN 'February' then '02/01' when 'March' then '03/01' when 'April' then '04/01' when 'May' then '05/01' when 'June' then '06/01' when 'July' then '07/01' when 'August' then '08/01' when 'September' then '09/01' when 'October' then '10/01' when 'November' then '11/01' ELSE '12/01' END as date)END)) s_7, FILTER(FILTER("Vivaldi Detail"."Fact Sales Detail"."SOM %" USING ("Vivaldi Detail"."Time"."Year" =right('September 2012',4))) USING "Vivaldi Detail"."Time"."Month Number" <=month(CASE WHEN 1=2 THEN CURRENT_DATE ELSE cast(right('September 2012',4)||'/'||CASE left('September 2012',LOCATE(' ','September 2012')-1) WHEN 'January' THEN '01/01' WHEN 'February' then '02/01' when A brief sample of a typical formula which causes this is; -
    FILTER(FILTER(FILTER("Fact Sales Detail"."SOM %" USING ("Time"."Year" =   right('@{MYEAR}{September 2010}',4))) USING ("Time"."Month Number" = 2)) USING "Time"."Month Number" <= month(CASE WHEN 1=2 THEN CURRENT_DATE ELSE cast(right('@{MYEAR}{September 2010}',4)||'/'||CASE left('@{MYEAR}{September 2010}',  LOCATE(' ','@{MYEAR}{September 2010}') -1) WHEN 'January' THEN '01/01'  WHEN 'February' then '02/01' when 'March' then '03/01' when 'April' then '04/01' when 'May' then '05/01' when 'June' then '06/01' when 'July' then '07/01' when 'August' then '08/01' when 'September' then '09/01' when 'October' then '10/01' when 'November' then '11/01' ELSE '12/01' END as date)  END    ))The September 2010 default being EXACTLY what is selected from the dashboard prompt when testing. It does not error, but returns no data in isolation, but when when from the prompt it errors...
    And the date format, if fed into a cast ('2012/09/01' as date) does not error.
    Anyone help - this is really driving me mad, syntax is good - it should work!!!
    thanks,
    Robert.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to input char and float

    hello,
    I'm working in Linux platform.I'm new to Java programming ,will u help me to input char and float variables?
    and also will u tell me how to clear the screen(just like we do system("clear"))
    thank you
    anchal...

    hello,
    I'm working in Linux platform.I'm new to Java
    Java programming ,will u help me to input char and
    float variables?If u want to input variables from a properties file look at the class java.util.Properties(http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html)
    If you want to read user input from the keyboard look at System.in (http://java.sun.com/j2se/1.4/docs/api/java/lang/System.html#in)
    and also will u tell me how to clear the screen(just
    like we do system("clear"))
    thank you
    anchal...
    for( int i = 0; i < 25; i++ )
      System.out.println();

  • Reg : CHAR to FLTP conversion

    Hi All,
    I want to convert char value '55.5'  to floating point value.
    I tried using the below function modules. These two function modules does not accept the decimals .
    CHAR_FLTP_CONVERSION
    CHAR_FLTP_CONVERSION_TO_SI
    can any one suggest how can i convert the decimal char values ('55.55') to floating point values.
    thanks
    Vijay

    hi
    data:pack type p deimals 2.
    first pass char value to pack and then from pack pass it to floting point variable.
    Regards
    Neha

  • Float Conversion

    I am passing 2 strings of data Social Security Number and a string to be parsed
    1) SSN 123456789
    2)String PH80.00 170915.76 AAE
    The string is parsed PH is extracted, 80.00 is extracted and 170915.76 is converted, however, it is converted to 170916.77. .01 is added to the value. Why does this occur? I think it has to do with the float. The code is as follows
    * Created on Jun 13, 2007
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.abbott.HRT.US018;
    * @author Administrator
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    public class TransformData {
         * The below Function is for handling Compensation Update Records
         */ 2 examples of string passed MI80.00 242050.00 AAE Output produced is 242050.00
    PH80.00 170915.76 AAE Output produced is 170915.77
         private String compensationUpdate(String sRecord) {
              //1.Map directly the source data to target data and make changes to below lengths.
              StringBuffer sBuf = new StringBuffer(sRecord);
              //          Correction : Make the length of sBuf equal to 21 in order to reduce the risk of runtime exception
              if (sBuf.length() < 21) {
                   while (sBuf.length() != 21) {
                        sBuf.append(' ');
              //2.     Schedule Hours : Format the data into "ZZ9.99" at position 3-8
              String substring = sBuf.substring(2, 8);
              substring = formatNumber(substring, 4, 6, 2);
              sBuf.replace(2, 8, substring);
              //3.     Base Rate : Format the data into "ZZZZZZ9.99" at position 9-29. The target position will be 9-18
              substring = null;
              substring = sBuf.substring(8, 29);
              substring = formatNumber(substring, 8, 10, 2);
              sBuf.replace(8, 18, substring.substring(0, 10));
              sBuf.delete(18, 29);
              //4.     Performance Rating : For now no mapping is defined
              //At last append 434 spaces to the record
              sBuf = appendSpaces(sBuf, 434);
              return sBuf.toString();
         * The below Function is for formatting numbers Records
         private String formatNumber(
              String input,
              int position,
              int length,
              int decPlaces)
              throws NumberFormatException {
              //17.08.2007 : If empty string has come, send back the same
              int int1 = input.lastIndexOf(' ');
              int int2 = input.length();
              if (int1 == int2) {
                   return input;
              // position = actual position of dec place (e.g.4 for ZZ9.99)
              //length = actual length (e.g. 6 for ZZ9.99)
              //decPlaces = (e.g. 2 for ZZ9.99)
              //First get the input converted into float and back so as to add a decimal sign if it does not exist
              float f;
              try {
                   f = Float.parseFloat(input);
              } catch (NumberFormatException ex) {
                   throw new NumberFormatException(
                        "Exception Occurred:" + ex.getMessage());
              StringBuffer sb = new StringBuffer(length);
              sb.insert(0, f);
              //Identify the position of decimal sign and then shift it gradually
              int index = sb.indexOf(".");
              if (index < position && index != -1) {
                   while (index < (position - 1)) {
                        sb.insert(0, " ");
                        index = sb.indexOf(".");
                   /*If there is no decimal sign, put one at the desired position                         
                                            if(index == -1){
                                                 int int1 = Integer.parseInt(input);
                                                 sb.ins;
                                                 sb.insert(position,".");
              //Fill blank spaces after decimal sign with zero
              while (sb.length() < length) {
                   sb.append("0");
              return sb.toString();
    The code is as follows

    Volume is not precision. You need to be precise and informative. This end is not served by simply dumping huge volumes of code or data into a help request. If you have a large, complicated test case that is breaking a program, try to trim it and make it as small as possible.
    This is useful for at least three reasons. One: being seen to invest effort in simplifying the question makes it more likely that you'll get an answer, Two: simplifying the question makes it more likely you'll get a useful answer. Three: In the process of refining your bug report, you may develop a fix or workaround yourself.
    -- http://www.catb.org/~esr/faqs/smart-questions.html
    Example:
    assert 170915.77F == Float.parseFloat("170915.76"); // why?And here's the answer:
    http://en.wikipedia.org/wiki/Floating_point
    http://java.sun.com/developer/JDCTechTips/2003/tt0204.html#2
    http://docs.sun.com/source/806-3568/ncg_goldberg.html
    Cheers!
    ~

  • Char to INT2 conversion

    Hi all,
    i have a character type variable of length 250 and it is assigned to a structure containing 15 fields and one of the field is of type INT2.
    Now a character value of '77' is transformed to '14135' for that INT2 field when i assign the string to the structure.
    Can any one tell me the reason behind this and is there any FM that would mimic the same conversion.
    For INT2 data type the number of characters are 5 and the internal format is ABAP type as 's' and length = 2.
    Amogh

    HI Amogh,
       can you show your coding? I get 77 in int2 type variable also.
    Regards,
    ravi

  • Abt char to numeric conversion

    There is a field named bcode in data base that is of char length 3 , i want 1 to 10 insert in dat field, is it possible , i know yes , so tell me dat field is behaving like character when i m selecting values from selection screen , what i want when i m entering 1 to 7 it should show only then as a numeric field do , how we can do dat? tell me in details?

    Then follow Sandipan Ghosh's suggestion above.  Read the database table into an internal table, convert the character numeric data to integer.  Change your select option to be integer.
    Or create a table, e.g. z_numtab, with two fields - CH3 type CHAR 3, and INT type INT1.  Populate it with all the numbers 0-999.  Then use it to convert the select option to a series of equalities.
    DATA: num TYPE c LENGTH 3,
          int TYPE i.
    DATA: lt_numtab TYPE STANDARD TABLE OF z_numtab.
    SELECT-OPTIONS: s_num FOR num.
    RANGES: r_num FOR i.
    FIELD-SYMBOLS: <ls_numtab> TYPE z_numtab.
    AT SELECTION-SCREEN..
      LOOP AT s_num.
        IF s_num-low CN ' 0123456789' OR s_num-high CN ' 0123456789'.
          MESSAGE e000(s1) WITH 'Numerics only'.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      LOOP AT s_num.
        r_num-option = s_num-option.
        r_num-sign   = s_num-sign.
        r_num-low    = s_num-low.
        r_num-high   = s_num-high.
        APPEND r_num.
      ENDLOOP.
      SELECT * FROM z_numtab INTO TABLE lt_numtab WHERE int IN r_num.
      REFRESH s_num.
      s_num-sign = 'I'.
      s_num-option = 'EQ'.
      LOOP AT lt_numtab ASSIGNING <ls_numtab>.
        s_num-low = <ls_numtab>-ch3.
      ENDLOOP.
      SELECT * FROM dbtab INTO TABLE lt_dbtab WHERE bcode IN s_num.
    matt

  • Char to date conversion

    How to convert a date into char????
    When i'm using TO_CHAR('26-JAN-01','DD/MM/YY') it is showing error?
    Can anybody suggest me where i was wrong?
    Thanks in advance.

    Hi,
    Welcome to the forum!
    1002903 wrote:
    How to convert a date into char????
    When i'm using TO_CHAR('26-JAN-01','DD/MM/YY') it is showing error?
    Can anybody suggest me where i was wrong?'26-JAN-01' is a VARCHAR2, not a DATE. The first argument to TO_CHAR is supposed to be a DATE. If you use a VARCHAR2 in a place where a DATE is required, Oracle does not raise an error immediately. Oracle will try to convert the VARCHAR2 to a DATE, but that's likely t result in an error, anyway. Always call functions with the right types of arguments, not the wrong types.
    If you have a string that represents a DATE, you can convert it into a DATE using the TO_DATE function. You can then call TO_CHAR on the results, to get a string in whatever format you want:
    TO_CHAR ( TO_DATE ( '26-JAN-01'   -- or any string expression (a literal like this works, but it's silly)
                      , 'DD-MON-YY'
            , 'DD/MM/YY'
            )

  • Char to netprice conversion

    experts
    i am getting data from the flat file.
    i am getting amount which is 10 chars and i am storing it as in char
    data : price(10) type c.
    now i want to move it to sap netprice which is like this
    data :netpr type vbap-netpr.
    now i am trying to move the data like this.
    move price to netpr." here it is giving error as both are diffent types
    even i tried like this also
    write price to netpr" here also giving error.
    i cannot change the price  data type , so please tell me how to convert price which is char type to netpr.

    hi
    when the price is coming in your char field , just you need to take care to remove  comma ','. means in char field if 1,234.34 then you should use  string operations  REPLACE ,CONDENSE  etc  to make it  1234.34. if 1,234.00 to  1234.00
    you may hav to write logic as the user may hav different  decimal format , you can use FM SUSR_GET_USER_DEFAULTS to get the  user decimal format , and write code accordinly , ,,  Just remember delete commas , but  dot . should be in proper place to represent decimal..
    then just use "move char_field  to  netprice_field"  now it will not give any error.
    thanks
    Kakoli

  • Char to numeric conversion

    Hello,
             I am calling a subrouting from SAP SCRIPT.
             But in the subroutine I am not able to change the currecy value to integer.
            FORM cal_Tot tables ntwr structure itcsy
                                            tot structure itcsy.
           DATA value type vbap-netwr.
           value = ntwr-value.
            ENDFORM.
    If the value of ntwr-value is 300.0 its working but
    if the value of ntwr-value is 1,345.0 this is giving runtime error.
    How can store 1,345 into variable value

    Hi ,
    Chk this one
    report zcurr.
    data: input type  bapicurr-bapicurr .
    data: c(20) type c.
    data: output(15) type p decimals 2.
    c = '12,345.78'.
    clear sy-subrc.
    while sy-subrc = 0.
      replace ',' with space into c.
    endwhile.
    condense c no-gaps.
    input = c.
    call function 'BAPI_CURRENCY_CONV_TO_INTERNAL'
      exporting
        currency                   = 'INR'
        amount_external            = input
        max_number_of_digits       = 25
    importing
        amount_internal            = output
      RETURN                     =

  • How to call labview DLL from C#, passing char, char[], float[], long, short

    Hi,
    I'm having trouble calling labview dll from C# to perform certain function.
    The function supposed to return the values in the float Analysis[] array. However, when I execute it it only returns zero values.
    It seems that some parameters are not properly passed to the dll.
    Below is the function in the header file:
    void __stdcall Optical_Center(char FileDirectory[], long ImagePtr,
        short int Height, short int Width, char ReadFromFile, float Analysis[],
        long lenAnalysis);
    and my corresponding dll import in c#:
    [DllImport(@"SMIA.dll", CharSet = CharSet.Ansi)]
            public static extern void Optical_Center([MarshalAs(UnmanagedType.LPStr)]string FileDirectory, long ImagePtr,
                short Height, short Width,char  ReadFromFile, IntPtr Analysis,
                long lenAnalysis);
    string str = @"C:\SMIA.raw";
    int len = 3;
    long m_lenAnalysis = 3;
    long m_ImagePtr = 0;
    short m_Height = 2464;
    short m_Width = 3280;
    IntPtr m_PtrArray = Marshal.AllocHGlobal(len * Marshal.SizeOf(typeof(float)));
    char m_ReadFromFile = '1';
    Optical_Center(str,m_ImagePtr,m_Height,m_Width,m_ReadFromFile,m_PtrArray,m_lenAnalysis);
    float[] m_Analysis = new float[len];
    Marshal.Copy(m_PtrArray, floatArray,0,len);
    Marshal.FreeHGlobal(m_PtrArray);
    string printstr = "";
    for (int i=0; i<len; i++)
        printstr = printstr + floatArray[i].ToString() + "\n";       
    MessageBox.Show(printstr);
    Appreciate if anyone can help, thanks.
    KL

    I was just about to post the header file of the DLL, when
    I noticed that there's a function called LVDLLStatus.
    This little thingie turned out to be a rather handy tool.
    With that function I found that in the DLL I had a problem
    with another function that prevented the DLL to be correctly
    loaded.
    This other function in the DLL is for generating digital output
    and it worked as it should, when tested from LV.
    Anyway if someone is interested, I got it working by using
    the LoadLibrary and GetProcAddress function, as in the
    source code thatI posted earlier.
    I will investigate what is wrong with that digital output, and
    post into a another thread if I have problems with that.

  • XLS upload via HSODBC. Unable to upload numeric (float) fields

    hi,
    I wrote a program unit with Oracle Forms Builder 10g to upload and read an Excel sheet.
    I created a HSODBC Data link to my DB, and used Excel 2003 to edit the XLS file to upload, and WEBUTIL_FILE_TRANSFER.CLIENT_TO_AS(client_dir_file,'\\server\dir\myfile.xls') to upload.
    My DBLink works and Im able to upload the file. But it seems oracle is unable to upload some fields containing numeric (float) values.
    running DESCRIBE Sheet1$@hsodbc; I got this table structure
    UPLOAD_DATE          DATE
    NUMBER VARCHAR2(32512 CHAR)
    CODE VARCHAR2(32512 CHAR)
    DESCR          VARCHAR2(32512 CHAR)
    SIMILARS FLOAT(49)
    WIDTH VARCHAR2(32512 CHAR)
    HEIGHT VARCHAR2(32512 CHAR)
    HIGH      VARCHAR2(32512 CHAR)
    ITEMS      FLOAT(49)
    fields SIMILARS, WIDTH, HEIGHT, HIGH, ITEMS contain numeric values in float format (ex: 1,00000). When I run
    SELECT * FROM SHEET1$@HSODBC
    I get that WIDTH, HEIGHT, HIGH columns are EMPTY (contain NULL values), while SIMILARS and ITEMS contains not null values.
    I am sure that the \\server\dir\myfile.xls contains not null values for WIDTH, HEIGHT, HIGH fields! I tried to change cells format before upload, setting them to FLOAT, but I got no results!
    Please help me, how can I do to change cell format in order to obtain a correct upload?

    E.C.
    there is a mistake in the subject. As I said in my thread, the upload works and the uploaded file contains all values. My problem is that I am "unable to READ" the numeric values stored in VARCHAR2 fields.

  • Need help in Report.... Conversion of data elements

    Hi All,
    Iam doing a report. Chk the code below
    SELECT roleid
        FROM SRRELROLES
        INTO gs_roleid
        WHERE objkey = gs_guid
        AND objtype = ‘BUS2010020’.
    When i activate this it is throwin an error sayin dat <b>" GS_GUID and OBJKEY is not mutually convertible in a unicode program.... "</b>
    <b>Here objkey is RAW 16  and gs_guid is char(70)..</b>
    Can anybody help me out in this... and is there any conversion routines for doing this.
    Thanks,
    Shiva shekar k

    declare a gs_guid variable as raw data type .. and then convert it to char
    and for conversion refer
    convert raw type to char
    Convert RAW 1022 TO CHAR 255
    Convert RAW 1022 to CHAR 255

  • 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

  • Bapi : BAPI_ALM_ORDER_MAINTAIN not updating table AFVU-USR08

    Hi, I have a requirement to update table AFVU-USR08.I am actualy dealing with tcode IW32/IW33 where in we need to update operation-->enhancement tab.I am using BAPI : BAPI_ALM_ORDER_MAINTAIN to do this.I am testing the BAPI directly( Not called in an

  • CSAP_MAT_BOM_OPEN Short Dump with CONVERT_MATNR_TO_INTERN_FORMAT

    Has anyone else had this issue? All help appreciated. I am using the function CSAP_MAT_BOM_OPEN to update a BOM. Running it generates a short dump with the following information: In PERFORM or CALL FUNCTION "CONVERT_MATNR_TO_INTERN_FORMAT", the actu

  • Video too long

    I have just finished editing a video of our local theater company's production of "The Caine Mutiny Court Martial."  The total length of the program is 2 hours 15+ minutes, with credits and bows.  I can't get the program under two hours without cutti

  • Random hidden HTML fragments in email signature

    I've successfully added a HTML derived signature to my iPad which includes an image. The problem is through trial and error I have some how added extra spaces that I can't remove through the signature interface. These spaces can be removed when compo

  • How do i find out what version i'm running

    How do i find out what version i'm running, i'm on CC (6 is it), i want to check if i'm running 6.0 or 6.01 - the update, i cannot see where my version is. If i press 'About Adobe Lightroom', it takes me to the credits box which shows what camera raw