Help ! for date column type

Hi,
I am having two tables tdz12 and tdf31. TDF31 is a date field. and TDZ12 is transactions history table. If I do
11:30:39 SQL> alter session set nls_date_format='DD-MON-RRRR HH24:MI:SS';
11:30:57 SQL> select c65201 from tdf31;
C65201
30-NOV-2006 00:00:00
11:46:48 SQL> select distinct a9000 from tdz12 where a9000 >= '01-NOV-06';
A9000
01-NOV-2006 00:00:00
02-NOV-2006 00:00:00
03-NOV-2006 00:00:00
04-NOV-2006 00:00:00
06-NOV-2006 00:00:00
07-NOV-2006 00:00:00
08-NOV-2006 00:00:00
09-NOV-2006 00:00:00
10-NOV-2006 00:00:00
11-NOV-2006 00:00:00
13-NOV-2006 00:00:00
14-NOV-2006 00:00:00
15-NOV-2006 00:00:00
16-NOV-2006 00:00:00
17-NOV-2006 00:00:00
18-NOV-2006 00:00:00
20-NOV-2006 00:00:00
21-NOV-2006 00:00:00
22-NOV-2006 00:00:00
23-NOV-2006 00:00:00
24-NOV-2006 00:00:00
25-NOV-2006 00:00:00
27-NOV-2006 00:00:00
28-NOV-2006 00:00:00
29-NOV-2006 00:00:00
30-NOV-2006 00:00:00
26 rows selected.
If I do
11:26:39 SQL> select sum(a9060)
11:27:52 2 from tdz12
11:27:52 3 where A9000>=(select to_date(to_char(C65201,'YYYYMM')||'01','YYYYMMDD') FROM TDF31);
SUM(A9060)
0
Why I am getting 0 records ? ( Pl tell me the reason, not alternate way to get records )
thanks & regards
PJP

TRUNC(c65201,'MONTH')is a simpler alternative to
TO_DATE(TO_CHAR(c65201,'YYYYMM')||'01','YYYYMMDD')although it will give the same result here.

Similar Messages

  • Problems with F4 help for dates

    Hi all.
    In a redesign project we use a new structure for the bsp pages. Since the redesign every F4 help for dates is giving us a java script error.
    Row:      689
    Column: 3
    Error:     'document.all.sapDate.style' is NULL or no object
    Code:    0
    URL:      http://<server>:<port>/wbw(bD1..)/main.do
    In the first version it was a view with some page fragments included containing the F4 helps.
    The new application is a main view containing a changing view over command <bsp:call comp_id="...
    Does the difference in place used matter?
    I also removed the attribute themeRoot from <htmlb:content ...
    Thanks for every hint,
    Timo.

    I have exactly the same problem, someone can tell me how to fix it please ?
    Here is my code for the "date" field :
    CASE p_column_index.
            WHEN 1.
              DATA: tv_col1_inputfield TYPE REF TO cl_htmlb_inputfield.
              CREATE OBJECT tv_col1_inputfield.
              tv_col1_inputfield->id    = p_cell_id.
              tv_col1_inputfield->cellvalue = 'TRUE'.
              tv_col1_inputfield->value = '20000131'.
              tv_col1_inputfield->type = 'DATE'.
              tv_col1_inputfield->showhelp = 'TRUE'.
              tv_col1_inputfield->disabled = 'FALSE'.
              p_replacement_bee      = tv_col1_inputfield.
    Edited by: BB.Fethi on Feb 8, 2010 2:10 PM
    Ok sorry for this post, i haven't see the "remove tag htmlb:page"....
    Edited by: BB.Fethi on Feb 8, 2010 2:13 PM

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • Search help for DATE field

    HI all,
    I want to attach search help for a DATE field created in screen painter.
    For PERNR, PREM is attached. Similarly what is the statndard search help name for DATE field?
    Thanks,
    Shanthi.

    Hi ,
    Declare the date field as sy-datum ,
    parameters : date type sy-datum .
    This shud bring the standard search help for date .
    Thanks ..Get back for any issues.
    Anil

  • To implement search help for date and time fields details

    how can i implement search help for date and time fields in screen painter

    Hi
    Declare the variables as sy-datum and sy-uzeit or any other pre-defined data typ of date and ime types. Serach help will automatically comes.
    Aditya

  • APEX_UTIL.IR_FILTER with BETWEEN operator for date columns

    Hi,
    when I run my application I can set a BETWEEN-filter for date columns. I can't find a way how to use it with the APEX_UTIL.IR_FILTER function. Maybe I miss something?
    Documentation: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_util.htm#CHDDDFBF
    Tobias

    Tobias,
    If you think about it, a "Between" is nothing more than a single line way to say
    WHERE :X >= :Y
    AND :X <= :Z
    So you should be able to apply two filters to the report using the LTE and GTE operators
    Hope this helps
    Doug Gault
    www.sumneva.com

  • Import from DDL script - Why do I get domains for every column type?

    I've only been using Data Modeler for a day and my first task was to import a database definition from a DDL script.
    I noticed that every column definition resulted in the creation of a domain for the column type, with names like "VARCHAR_0_0_30" for a varchar2(30) type.
    Is there some way of avoiding the creation of domains in this way? I'd prefer to use domains only when they serve a more useful purpose such as validation by check constraints.

    Go to Preferences - > Data Modeler - > DDL and uncheck "Create Domains During Import" option.
    Ivan

  • JQuery format mask for date columns in tabular form

    Hi,
    How can I apply jQuery format mask for date columns in a tabular form?
    Thanks.
    Andy

    OK, I realized I didn't choose the default type as "Pl/SQL Expression", now it's working correctly.
    Thank you very much!

  • F4 help for date in select options..

    Hi Gurus,
    I want a search help for date field which belongs to select options.
    I know if it is a parameter we directly map the attribute value to that data element.
    Can some help me with this..
    Best Regards,
    Navin Fernandes.

    Hi Gurus,
    The select options works for date.. I got the solution.
    It directly relates to the default data dcitionary help.
    Got it from this example: WDR_TEST_SELECT_OPTIONS
    Best Regards,
    Navin Fernandes.

  • Search help for date in VC

    Hi, 
    I have created an iview in Visual Composer for a query. it contains date field on selection variable fomr. i tried entering date in various format, but it gives an error : variable expects interval value ; enter an interval".
    can we provide search help for date field in VC?
    Regards,
    Sonali.

    Hi,
    You have to create search help it avoid inconsistency.
    Thanks & Regards,
    Venkat.

  • F1 Help for Data elements

    Hi All,,
    i want to add F1 help for data elements.How can i do this.Kindly suggest me the steps to perform this.

    hi
    use this link
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/d47ee849e111d189730000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/11e39c459d7201e10000000a155369/frameset.htm
    Cheers
    Snehi
    Edited by: snehi chouhan on Jul 24, 2008 11:10 AM

  • Using number datatype for date column

    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?
    Many thanks

    Hi,
    Ora_83 wrote:
    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?Yes, there's a definite disadvantage.
    Oracle provides date arithmetic and a number of functions for manipulating DATEs. None of them work with numbers.
    For example,
    SELECT    TRUNC (order_date, 'MONTH')     AS order_month
    ,       AVG (ship_date - order_date)     AS avg_delay
    FROM       orders
    GROUP BY  TRUNC (order_date, 'MONTH')
    ;order_month involves a DATE function; it's pretty easy to find the month that conatins order_date.
    avg_delay involves date arithmetic. It's extrememly easy to find how much the time passed between order_date and ship_date.
    Depending on how you code dates as numbers, doing either one of the above may be just as easy, but doing the other will be very difficult. You'll waste a lot of effort converting the NUMBERs to real DATEs whenever you need to manipulate them.
    Validation can be very difficult for NUMBERs, also.
    Watch this forum. It's a rare day when there's not some question about how to get around a problem caused by storing dates in a NUMBER (or VARCHAR2) column. Don't add to that. Always use DATE columns for dates.

  • How to get the F4 help for table columns ..

    Dear All,
    Here I have created table with cell editors of INPUT FIELD .
    And I would like to provide the f4 help for those columns .
    Here I have checked the node , which i have binded to the table, there input help mode is set to Automatic and search helps are also attached for that node .
    But in the table I am not getting the F4 help . Where as if i create the input fields invidually i am able to see the F4 help .
    But for table column I am unable to find..
    Help me regard this...
    Thanks & regards,
    Veerednra Nath

    Hi,
    In debugging , the I have seen the node info attributes list ( VALUE_HELP_ID and VALUE_HELP_MODE ) .
    For you understanding, Here I am giving the values which contains ,
    VALUE_HELP_ID contains the AUTO:VBUK
                                                    AUTO:VBUP
                                                    AUTO:MAT1
                                                    AUTO:H_T023
    and
    VALUE_HELP_MODE contains the  all Zeros for all the four attributes .
    Hope I have given correct inputs .
    Thanks & Regards,
    Veerendra Nath

  • Static input help for DATS type

    Hello,
    I'd like to link static input help for screen field of DATS type. If I click on help linked to this screen field I get CONVT_NO_NUMBER error: 'Unable to interpret "=2" as a number.'
    My steps:
    - In Screen Painter I selected desired screen field and selected DATS type and "1 Show at selection" in its details.
    - I defined global variable with same name as desired screen field
    What's the problem?
    Best regards,
    Josef Motl

    Hi,
    do this way.....
    first declare the variable in program as
    1. data: date type sy-datum.
    2. now go to your screen,(click on F6) use get from Program
    now choose date form it , and say ok, now save it and activate it.
    delete the old one..
    now you will be able to get all the things which you want.
    automatical validation also possible, and F4 also possible.
    Regards
    vijay

  • Which type of index is useful for date columns with time stamp

    Hi all,
    I am using date column in the where clause of an SQL Query. The values stored in the date column are includes timestamp. The query is very slow and there is no index on the date column.
    Can any body suggest which index is better on date columns
    Thanks

    I am using date column in the where clause of an SQL Query.Dates a re hard queries to tune. This ...
    WHERE start_date BETWEEN to_date('01-SEP-05') AND to_date('02-SEP-05')...probably requires a very different execution plan to this...
    WHERE start_date BETWEEN to_date('01-JAN-01') AND to_date('02-SEP-05')Just bunging an index on the date column may speed up your specific query but break something else. So be careful.
    Cheers, APC

Maybe you are looking for