Hii Regarding Date Comparision

SELECT count(CLM.CLM_CD) from WWOWNER.CLAIM CLm,WWOWNER.DEALER DLR,WWOWNER.CLAIM_FACT Cf
WHERE CLm.CLAIM_KEY=CF.CLAIM_KEY AND DLR.DEALER_KEY=CF.DEALER_KEY
AND DLR.SRC_TYPE_CD='Dealer' and to_date(current_timestamp,'mm/dd/yyy') between '03/01/2008' and '03/01/2010'
when I am writing this query I am Unable to compare the dates .. Please help me I need it.
Thanks,

Warren Tolentino wrote:
and try to wrap your date characters in to_date()And try not to wrap date/timestamp into TO_DATE ;) :
SELECT count(CLM.CLM_CD)
  from WWOWNER.CLAIM CLm,WWOWNER.DEALER DLR,WWOWNER.CLAIM_FACT Cf
WHERE CLm.CLAIM_KEY=CF.CLAIM_KEY AND DLR.DEALER_KEY=CF.DEALER_KEY
   AND DLR.SRC_TYPE_CD='Dealer'
   and current_timestamp >= to_date('03/01/2008','mm/dd/yyyy')
   and current_timestamp < to_date('03/02/2010 ','mm/dd/yyyy')
/SY.

Similar Messages

  • Appropritate forum to put queries regarding data archiving

    Hi All,
    Which one is the appropriate forum to put queries regarding data archiving?
    Thanks in advance.
    Vithalprasad

    Yes you can use this forum, also there is one forum for Data Transfers.
    Regards,
    Altaf Shaikh

  • Regarding dates.

    hi gurus, i have some doubt regarding dates function.
    if i enter any date of present month i wand the first date of next month.
    for example  if i enter any date in january from 01/01/2007  to 31/01/2007 i want
    first date of february. ie 01/02/2007. plz help me.
    regards
    vamsi.

    Hi
    use this coding
    data : d1 type sy-datum,
            d2 type sy-datum,
            d3 type sy-datum,
            d4(8),
            m(2),
            y(4).
    d1 = sy-datum.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d1
    IMPORTING
       E_DATE        =  d2 .
    write :   d1.
    skip 3.
    m = d2+4(2).
    y = d2+0(4).
    concatenate  y m '01' into d4  .
    d3 = d4.
    write : / d3.
    write : / d2.
    write / '***********2 month****************************'.
    d3 = d2 + 1.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d3
    IMPORTING
       E_DATE        =  d2 .
    write :/ d3,
            / d2.
    write / '**************3 month ***************************'.
    d3 = d2 + 1.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d3
    IMPORTING
       E_DATE        =  d2 .
    write :/ d3,
            / d2.

  • Regarding date types

    hi all,
    i need some information regarding date types infotype 41.
    i need to print date types in sequential manner like dar01 dar02 dar03 like upto 12 date types.
    can you please suggest me how should i print them.
    thanks,
    madhavi.

    Hi,
    Steps to create a HR Infotype:
    1) Go to Transaction PM01.
    2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
    3) Select the 'Employee Infotype' radio button.
    4) Select the 'PS Structure Infotype'.
    5) Click on Create... A separate table maintenance window appears...
    6) Create a PS structure with all the fields you want on the Infotype
    7) Save and Activate the PS structure
    8) Go back to the initial screen of PM01.
    9) Click on 'All' push button. It takes a few moments.
    10) Click on 'Technical Characteristics'. Infotype list screen appears
    11) Click on 'Change'(pencil) button
    12) Select your Infotype and click on 'Detail' (magnifying glass) button
    13) Give 'T591A' as subtype table
    14) Give 'T591S' as subtype txt tab
    15) Give your subtype field as subtype field
    16) Save and come back to PM01 initial screen
    17) Click on 'Infotype Characteristics' ... Infotype list screen appears
    18) Click on 'Change' (pencil) button
    19) Click on 'New Entries'
    20) Enter your Infotype number and short text
    21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype's infotype characteristics screen and use as the reference to fill yours)
    22) Save your entries.
    23) Now the Infotype is created and ready to use.
    24) If you want to change the layout of the Infotype as per your requirement...
    25) In the PM01 initial screen...Select 'Screen' radio button and give 2000 as the screen name, then click on edit.
    26) In the next screen.. Select 'Layout Editor' and click 'Change'.
    27) Screen default layout appears...here you can design/modify the screen..change the attributes of the fields..etc.
    28) Save and activate. (Don't forget to 'Activate at every level)
    Subtype Creation :
    Transaction PM01 Goto Subtype Characteristics. Click on Append and then subtype. Enter the name and description of subtype on screen.
    Then goto technical Characteristics and maintain the details of subtype there. I.e name of subtype i.e. component name defined in PSnnnn. Subtype table is T591A.
    Subty.text tab is T591S and time const tab is T591A.
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    HR related site:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    Enhancement of Infotype
    Check the following
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf
    Infotype Enhancement overview screen
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a7586d-edd9-2910-68a8-8204303835a1
    with regards,
    Hema SUndara.

  • Urgent regarding Data & Task Audits Back Up

    Hi Experts
    Here my question is regarding Data Audit and Task audits in V 11.1.2.1
    -->If we take the back up of Data & Task audit tables data in to other backup_tables in same schema how this can be viewed through task audit and data audit through HFM?
    -->Whether any third part tools available to audit the tasks (DATA & TASK ) information...?
    -->Whether EPM maestro can be used here..?
    Thanks in advance
    Edited by: RajaKK on May 29, 2012 6:19 PM

    Use the Audit Extract utility bundled with HFM 11.1.2.1 to export this information periodically to a CSV file that you can view offline through any text editor, or even Excel. There is a command line feature for this as well, so you could incorporate this into a batch routine.
    For anyone attending Kaleidoscope in San Antonio, TX next month, I will present the various utilities that ship with HFM including this one. Hope to see you there!
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to guarantee that all events regarding Data Cache are dispatched when application is terminating? Urgent

    Hello,
    we have the phenomena that when an application is commiting a transaction and then terminating,
    often not all events regarding Data Cache are dispatched by the TCP kodo.RemoteCommitProvider.
    It seems that the JVM on termination is not waiting until RemoteCommitProvider has dispatched all events regarding Data
    Cache. In this way we sometimes loose some cache synchronization and some of our customers run into serious problems.
    Is there a way to guarantee that all Data Cache events are dispatched before the aplciation terminates
    (maybe implementing a shutdown hook?).
    best regards
    Guenther Demetz
    Wuerth-Phoenix SRL

    Hi,
    as nobody answered to my question I try to explain it more simple:
    Are the TCP-kodo.RemoteCommitProvider threads acting as user threads or as threads of type 'deamon' ?
    I hope that soon someon can answer
    best regards
    Guenther Demetz
    Wuerth-Phoenix SRL
    G.Demetz wrote:
    Hello,
    we have the phenomena that when an application is commiting a transaction and then terminating,
    often not all events regarding Data Cache are dispatched by the TCP kodo.RemoteCommitProvider.
    It seems that the JVM on termination is not waiting until RemoteCommitProvider has dispatched all events regarding Data
    Cache. In this way we sometimes loose some cache synchronization and some of our customers run into serious problems.
    Is there a way to guarantee that all Data Cache events are dispatched before the aplciation terminates
    (maybe implementing a shutdown hook?).
    best regards
    Guenther Demetz
    Wuerth-Phoenix SRL

  • Help regarding data element

    I need some help regarding data element ZEXPDT.  I used it in an infoquery that was transported to QAS and it does not exist in QAS.  I thought it might be locked in a transport, but the below screen clip says it is not locked.  It was created in 3/2014.  Thanks.

    Either trick the system, SE11, add a space at end of text desciption and save,
    Or call transport workbench (SE01, SE10) create a transport request or use an existing one, then double-click on a task, switch to modify mode, add a line with R3TR DTEL name of the data element, save, then object list, lock in request/task menu.
    Or SE80, contextual menu of data element. (other functions, write transport entry)
    Regards,
    Raymond

  • Query regarding date range

    Hi I am using below query
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and to_char( M.CREATE_DATE , 'DD/MM/YYYY') = '16/10/2009'
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null
    and i got the result as 10 records but if i try to put in the date range as below
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and to_char( M.CREATE_DATE , 'DD/MM/YYYY') between '16/10/2009' and '17/10/2009'
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null
    i got the result as 653 records
    But it should be 10 only and when i check the records it is giving me wrong result.
    Can someone highlight how to use the range between the date, i need to check the number of records between the date range from 01/05/2009 to 01/10/2009

    this is all happening because of
    to_char( M.CREATE_DATE , 'DD/MM/YYYY') between '16/10/2009' and '17/10/2009'in your second query...
    that is doing a string comparision not date comparision...
    in string comparision
    check this example...
    select * from dual where '17/10/2009' > '16/10/2010'which will result a record but you might also observe that 17 th in 2009 is less than 16th of 2010. this is because here string comparision is ocurring.
    you need to change it as....
    M.CREATE_DATE between to_date('16/10/2009','DD/MM/YYYY') and to_date('17/10/2009','DD/MM/YYYY')so your query becomes...
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and M.CREATE_DATE between to_date('16/10/2009','DD/MM/YYYY') and to_date('17/10/2009','DD/MM/YYYY')
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null check your answer and get back.
    Ravi Kumar
    Edited by: ravikumar.sv on Oct 16, 2009 3:12 PM

  • I am unable to access iTunes.  Receive error regarding data execution prevention.  I've tried unloading/reloading.  Suggestions?

    I am unable to access iTunes.  Receive error regarding data execution prevention.  I've changed the Performance Options to exclude DEP for iTunes and I've tried unloading/reloading.  Still no success.  Suggestions?

    Try updating your QuickTime to the most recent version. Does that clear up the DEP errors in iTunes?

  • Date comparision not working in BI-Publisher in one scenario.

    Hi,
    Iam using sqlquery as a datamodel for BI-Publisher report. I have a requirement that the input parameters startdate and endate are Date types. When the user enters startdate and enddate and clicks on view, the report should show data which falls in between those dates.
    Here is the sample query i used.
    select * from
    table1
    where begintime >= :p_StartDate and begintime <=:p_EndDate
    Here begintime is a timestamp and p_StartDate and p_EndDate are just dates. So when comparing begintime with p_StartDate/p_EndDate, i guess its taking default time from that date and because of that the comparision is failing in 1 case. i.e, In the above query, though the comparision operator is >= or <= , ultimately > or < is getting effective. So to acheive the actual result, I need to give one day more for start and end dates.
    However I found a way to acheive this without adding extra day to both the dates. Here it is :
    select * from table1 where
    ( begintime >= to_timestamp(to_char(:p_StartDate) || '00 00 00', 'DD Mon YYYY HH24 MI SS')) and
    ( begintime <= to_timestamp(to_char(:p_EndDate) || '23 59 59', 'DD Mon YYYY HH24 MI SS'))
    But the above is working in sqleditor like jdeveloper database navigator. But not working in BI-Publisher.
    BI-Publisher is throwing error saying
    "ORA-01830: date format picture ends before converting entire input string"
    Please help as to how to go about this problem or any alternative solution.
    Thanks & Regards,
    -Vijay-

    Hi,
    I think it will be fine to trunc the begin time since :p_StartDate and p_EndDate are just dates without time stamp
    i.e:
    select * from
    table1
    where trunc(begintime) >= :p_StartDate and trunc(begintime) <=:p_EndDate;
    any problem with this.Please share the thought.
    Best Regards,
    mahi

  • Regarding dates(posting key ,clearing key ,key due ,base line)

    HI Friends,
    I am new to bi,could you please can any one explain me significance of the below dates .
    1) Posting key date
    2)clearing key date
    3)key due date
    4)base line date
    5)key date for due date
    Above date regarding FI-AP Report.
    Thanks in advance,
    Vas.

    1) posting date: the date, when a FI-position is posted (booked). (to differentiate with create date = the date when a FI-document is created)
    2) clear date: the date, when a position is payed (cleared) from Vendor (Supplier)
    3) due date: the date, when the position has to be payed (payment date)
    4) baseline date is more a self-defined date (company depending), where the company has a basis to calculate some cindition like the trade discount or due date... Ask your FI-Colleagues for more details.
    5) key date: It is more a input field when you execute a query. Based on this input field you can make a calculation or comparision (with certain requirements/conditions).
    For example: a FI-position is still open when the posting key date <= posting date. The position is cleared when clear key date > clear date and posting key_date < posting date.
    Another example: a FI-position is overdue when a key date for due date > due date and a posting key date > posting date.

  • Regarding data in R/3

    Hi All,
    I am using RSA3 to check data in Logistics DataSources such as 2LIS_03_BF, 2LIS_03_UM.
    However, our functional Consultants say that there is data in R/3.
    How to check whether there is data in R/3 and if available how to extract that data so that I will be able to check whether I can extract data or not using Extract Structure???
    Regards
    YJ

    Hi vijay,
    These data source are proving the inventory information…. So you need to extract this information by LO- Extrantion method…for that you can follow the following steps…
    1.     Activate the structure date source by using the T.Code LBWE
    2.     Delete the set up table for application are ‘03’ by using T.cde LBWG
    3.     After deleting the setup tables you need fill up these setup table by T.Code OLI03BW according you business requirement…
    4.     After complete of filling the set up table you need to initialize on these data source…by using the info package from BW Side…
    5.     After initialization you need to activate the update method for inventory information.
    Regards,
    PRK

  • Issue with Date Comparision

    Hi Buddies,
    I explain the scenario,
    I have an dunning letter statement report which basically run for the three remainders (1,2,3) to the customer.
    If the remainder 3 runs , i want to display the pervious remainder dates of 1 and 2 in my report.
    If the remainder 2 runs, i want to display the pervious remainder date of 1 in my report.
    I have date column in the dunning letter history table as Dunning_Date.
    How can we achive this in sql?. I am getting struck over here, please give your advice to do it.
    Regards
    Ram

    Is this really an SQL question or are you looking for a solution in Reports? If so you should ask this in the Reports

  • Date comparision issue in the report

    Hi Buddies,
    I explain the scenario,
    I have an dunning letter statement report which basically run for the three remainders (1,2,3) to the customer.
    If the remainder 3 runs , i want to display the pervious remainder dates of 1 and 2 in my report.
    If the remainder 2 runs, i want to display the pervious remainder date of 1 in my report.
    I have date column in the dunning letter history table as Dunning_Date.
    How can we achive this in sql?. I am getting struck over here, please give your advice to do it.
    Regards
    Ram

    I think your date format is in different format with the date format u stored in presentation variable so better check the date format of the case function u wrote it in you variable that will solve the problem.

  • Hi regarding data conversions

    Hi all,
    Is there any FM available to convert char to float

    Hi Ravi,
    Try these FM. Chk if it satifies ur requirement.
    CEVA_CONVERT_FLOAT_TO_CHAR
    FLTP_CHAR_CONVERSION
    Try this code also.
    REPORT Z_Conv.
    DATA : f TYPE f.
    DATA : s(15) TYPE c.
    f = '41'.
    CALL FUNCTION 'FLTP_CHAR_CONVERSION'
    EXPORTING
    DECIM = 2
    EXPON = 0
    input = f
    IVALU = ' '
    MASKN = ' '
    IMPORTING
    flstr = s
    WRITE :/ f.
    WRITE :/ s.
    <b>***Reward Points if Useful</b>
    Regards
    Gokul

Maybe you are looking for

  • JAVA Enhancement Package2

    Greetings! Enh.Pack2 damaged my system again and did it gently Now my ports (50200, 8002) don't work, but all J2EE process are green in MMC. I try to stop and strart J2EE - it doesn't help. I though that it can be that some services are deactivated (

  • QuickTime logo with a question mark

    Apologies if this is answered somewhere else, but I couldn't find the exact problem and I'm also very new at this. On certain web pages I get a quick time logo with a question mark over it appearing, that seems to indicate some kind of missing plug-i

  • Why is How I Met Your Mother Season 3 "Episode Only" when every other season has the option to buy the entire season?

    Why is How I Met Your Mother Season 3 "Episode Only" when every other season has the option to buy the entire season? Seems rather unfair to pay nearly £40 for each individual episode when each other season has the option to buy the entire season for

  • Ical stopped syncing

    help! my ical has stopped syncing. i have two users on the desktop mac and one on my ibook. usually it works seamlessly but since i did a software update it has stopped. i have tried to reset sync data and i even started a new user. everything seems

  • I can't connect my iPhone

    I click "add new device" go through all the steps, I see wifi signal on my iPhone, but Network Magic doesn't add the new device. Frustated!