Where clause with time stamp

Hii,
I have an issue with using where clause with time stamp. My requirement is to
select * from driver_on_policy
where last_change_datetime = '2001-03-06 19:00:06'
date is in this form 6/3/2001 7:00:06 PM
thnks
sam

If you want to use '6/3/2001 7:00:06 PM', then
where last_change_datetime = to_timestamp('6/3/2001 7:00:06 PM','DD/MM/YYYY HH:MI:SS PM')If you can use a literal string in ANSI standard YYYY-MM-DD HH24:MI:SS format, then just
where last_change_datetime = timestamp '2001-03-06 19:00:06' (That 'DD/MM' might need to be switched around to 'MM/DD' if you are in America.)
Message was edited by:
William Robertson

Similar Messages

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • Advertisement Details of Specific Computer with Time Stamp

    Hello Guys,
    Could you please help me how to get Advertisement Details of Specific Computer with Time Stamp?
    Thanks in Advance.
    Mukhyaprana

    It's true that there is no reliable install date, but IMO last status time for an advertisement is usually close enough. 
    Select r.name0, adv.advertisementname, stat.laststatename, stat.lastexecutionresult, stat.lastStatusTime
    from v_r_system r
    inner join v_clientAdvertisementStatus stat on stat.resourceID = r.resourceID
    inner join v_advertisement adv on stat.AdvertisementID = adv.AdvertisementID
    where r.name0 = 'clientname'
    order by adv.advertisementname

  • Mail attachment with time stamp

    Hi
    My scenario is Proxy to Mail.
    On receiver side I am getting the data as an attachment but i want that attachment with time stamp.
    How to add time stamp to the attachment in reciever mail adapter.
    Regards
    Sowmya
    Edited by: Sowmya on Aug 28, 2008 12:24 PM

    hi sowmya,
       The bellow link for MessageTransformBean..
      [http://help.sap.com/saphelp_nw70/helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm]
      In that ContentDisposition is used to fill the value for Attachment file name..
      Its allows the value accordingly "RFC1806" Note..
      RFC1806 allows accordingly RFC822 ..
      Check RFC822 ..
        5.  DATE AND TIME SPECIFICATION
    Regards,
    Prakasu

  • File name for append processing mode with time stamp

    Hi Experts
    we are doing file to file scenario using the processing mode as Append.
    the requirement for us to append the files and we need to have new file name with time stamp added to the appended file.but in the processing mode of the file adapter either we can append or add time stamp. thatz the problem I am facing now.
    we are doing file based processing not message based ,micheal blog regarding the dynamic file name is for message based not for file based.
    Please provide your valuable comments.
    Thanks
    Faheem

    Hi mohamed,
                      I suggest you to map the target source structure to the required filename u want, like for example ur filename is input26062008.txt means to the target structure u perform the following mapping
    constant (input) concat with currentdate function --> concat with constant .txt --> map this concat to target. So u will get the filename u expected with the time.
    Then in the communication channel u select the mode as append. Now ur requirement will get solve i think so. plz try.
    Regards,
    Murugavel

  • How to read multiple Digital samples and plot a chart with time stamps

    Hi,
     Could anyone send me a code that:
    1. Reads 'multiple samples(lets say 4) from single digital input' 
    2. 'plot digital data as a chart with time stamps'
    3. Find frequency
    4. Log data into file with time stamps
    I have attached the code which i tried.
    Thanks,
    LK
    Attachments:
    DigitalNSample.vi ‏27 KB
    DigitalNSample.vi ‏27 KB

    Hi,
     Could anyone send me a code that:
    1. Reads 'multiple samples(lets say 4) from single digital input' using NI USB 6009 or NI USB 6251.
    2. 'plot digital data as a chart with time stamps'
    3. Find frequency
    4. Log data into file with time stamps
    I have attached the code which i tried.
    Thanks,
    LK
    Attachments:
    DigitalNSample.vi ‏27 KB

  • TDMS viewer not showing data with time stamp

    Need help with time stamping data in a TDMS file generated by DAQ Assistant.
    When I use the TDMS Viewer, with the x-scale set to absolute time, the date starts at 1903. If I use Excel to look at the file the start time is correct (i.e. 2013).
    Solved!
    Go to Solution.

    Bo_Xie, I have simplifed my VI and now able to display the correct time stamp. Thank for your time!

  • Apache Trinidad is running with time-stamp checking enabled.

    Experts,
    Contents of my web.xml file
    <context-param>
        <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>false</param-value>
      </context-param>When my application runs i get the following on the weblogic console
    <ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
    Isnt it a bit strange ? Please advise what is wrong.
    thnks
    jdev 11.1.2.1

    If you're talking about the integrated WLS, time-stamp checking is automatically enabled no matter what so that changes you make in the IDE can be picked up. It's nothing to worry about.
    John

  • Inserting Current Date with time stamp in oracle database

    Hi Experts,
                     I want to insert the current Date and time stamp in a field in the Oracle Database Table.
    I am able to insert date but i am not able to insert the date with time stamp. Any Suggestions??
    Thanks
    Naveen

    Naveen,
    Do you want to get current date (from sysdate) with a specific format or transform a value containing a date/time value to insert it in ORACLE ?
    Usually, you insert current datetimestamp in a date field using this :
    TO_DATE(sysdate,'dd/mm/yyyy hh:mi:ss')
    you may have to tweak the format pattern ('dd/mm....') according to your needs
    if you want to transform a date, use something like this:
    TO_DATE(your_date,your_format)
    but make sure your format is compliant with your date, ie
    TO_DATE('31/12/2008','MM/DD/YYYY') could raise error (litteral does not match) cuz ORACLE can't recognize 31 as a month pattern
    Chris

  • File with time stamp

    Hi All,
    I using RFC to file scenario ,in this when file is created it folder it is coming with date and time stamp.but i am not using add time stamp in processing paramerts.i have checked the file name in communication channel monitoring it is coming without timestamp
    but in folder file is getting created with time stamp.
    Regards

    Hi Gangadhar,
    In the receiver file adapter, under Processing tab, see the value of File Construction Mode.
    This value should be Create instead of Add Time Stamp.
    After making the changes save & activate the file receiver channel. The output file then will not have timestamp appended to its name.
    Regards,
    Gautam Purohit

  • Bounce with time stamp

    hi, is there a way to bounce with time stamp in logic? can logic automatically put time stamped files in the right place in the arrange window?
    thx, w

    Hi, Acmarie.
    Thank you for visiting Apple Support Communities. 
    To see what time a message was sent or received. Drag any bubble to the left.  Below, I have included the user guide which references this new feature on page 66. 
    iPhone User Guide
    Cheers,
    Jason H. 

  • SQL query in SQL_REDO Logminor showing where clause with ROWID

    SQL query in SQL_REDO Logminor showing where clause with ROWID. I dont wanted to use rowid but wanted to use actual value.
    OPERATION SQL_REDO SQL_UNDO
    DELETE delete from "OE"."ORDERS" insert into "OE"."ORDERS"
    where "ORDER_ID" = '2413' ("ORDER_ID","ORDER_MODE",
    and "ORDER_MODE" = 'direct' "CUSTOMER_ID","ORDER_STATUS",
    and "CUSTOMER_ID" = '101' "ORDER_TOTAL","SALES_REP_ID",
    and "ORDER_STATUS" = '5' "PROMOTION_ID")
    and "ORDER_TOTAL" = '48552' values ('2413','direct','101',
    and "SALES_REP_ID" = '161' '5','48552','161',NULL);
    and "PROMOTION_ID" IS NULL
    and ROWID = 'AAAHTCAABAAAZAPAAN';
    DELETE delete from "OE"."ORDERS" insert into "OE"."ORDERS"
    where "ORDER_ID" = '2430' ("ORDER_ID","ORDER_MODE",
    and "ORDER_MODE" = 'direct' "CUSTOMER_ID","ORDER_STATUS",
    and "CUSTOMER_ID" = '101' "ORDER_TOTAL","SALES_REP_ID",
    and "ORDER_STATUS" = '8' "PROMOTION_ID")
    and "ORDER_TOTAL" = '29669.9' values('2430','direct','101',
    and "SALES_REP_ID" = '159' '8','29669.9','159',NULL);
    and "PROMOTION_ID" IS NULL
    and ROWID = 'AAAHTCAABAAAZAPAAe';
    Please let me know solution/document which will convert SQL redo rowid value with actual value.
    Thanks,

    Please enclose your output within tag so that people here can read it easily and help you. Also the reason that why you want to remove rowid?
    Salman
    Edited by: Salman Qureshi on Mar 20, 2013 3:53 PM                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Where clause with a combination of And and Or statements - Basic question

    Hi,
    I have a where clause with a combination of And and Or statements... May I know which one would run first
    Here is the sample
    WHERE SITE_NAME = 'Q' AND ET_NAME IN ('12', '15') AND TEST_DATE > DATE OR SITE_NAME = 'E' AND ET_NAME IN ('19', '20')
    can you please explain how this combination works
    Thanks in advance

    Hi,
    This reminds me of a great story. It's so good, it probably didn't really happen, but it's so good, I'm going to repeat it anyway.
    IBM once had an "executive apptitude test" that they would give to job applicants. There were some questions you might call general knowlege or trivia questions, and each question had a weight (for example, answering an unimportant queestion might score one point, an important question might be 5 points.) One of the questions was "What is the standard width of a mobile home?", and the weight of the question was -20: answering the question correctly did serious harm to your score. The reasoning was that the more you knew about mobile homes, the less likely you were to be their kind of executive.
    Now, as to your question, the correct answer is: I don't know. I don't want to know. Mixing ANDs and ORs without grouping them in parentheses is a really bad idea. Even if you get it right, it's going to confuse the next person who has to look at that code. Use parentheses to make sure the code is doing what you want it to do.
    If you really want to find out, it's documented in the SQL language manual. Look up "Operators, prcedence"
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/operators001.htm#sthref815
    You can easily do an experiment, using scott.emp, or even dual, where
    WHERE  (x AND y)
    OR      zproduces different results from
    WHERE   x
    AND     (y OR z)

  • Generate a where clause with outer join criteria condition: (+)=

    Hi,
    In my search page, I use Auto Customization Criteria mode, and I build where clause by using get Criteria():
    public void initSrpQuery(Dictionary[] dic, String userName) {
    int dicSize = dic.length;
    StringBuffer whereClause = new StringBuffer(100);
    Vector parameters = new Vector(5);
    int clauseCount = 0;
    int bindCount = 1;
    for(int i=0; i < dicSize; i++){
    String itemName = (String)(dic.get(OAViewObject.CRITERIA_ITEM_NAME));
    Object value = dic[i].get(OAViewObject.CRITERIA_VALUE);
    String joinCondition = (String)dic[i].get(OAViewObject.CRITERIA_JOIN_CONDITION);
    String criteriaCondition = (String)dic[i].get(OAViewObject.CRITERIA_CONDITION);
    String criteriaDataType = (String)dic[i].get(OAViewObject.CRITERIA_DATATYPE);
    String viewAttributename = (String)dic[i].get(OAViewObject.CRITERIA_VIEW_ATTRIBUTE_NAME);
    String columnName = findAttributeDef(viewAttributename).getColumnNameForQuery();
    if((value != null) /*&& (!("".equals((String).trim())))*/){
    if(clauseCount > 0){
    whereClause.append(" AND ");
    whereClause.append(columnName + " " + criteriaCondition + " :");
    whereClause.append(++bindCount);
    parameters.addElement(value);
    clauseCount++;
    If I want to generate following where clause:
    select
    ,emp.name
    ,emp.email
    ,emp.salesrep_number
    ,comp.name
    ,gs.srp_goal_header_id
    ,gs.status_code
    ,gs.start_date
    ,gs.end_date
    from g2c_goal_shr_emp_assignments_v emp
    ,jtf_rs_salesreps rs
    ,xxg2c_srp_goal_headers_all gs
    ,cn_comp_plans_all comp
    where 1 = 1
    and rs.salesrep_id = gs.salesrep_id (+)
    and gs.comp_plan_id = comp.comp_plan_id (+)
    and gs.period_year (+) = :1 -- :1 p_fiscal_year
    How can I generate a where clause with outer join : gs.period_year (+) = :1 ? Will I get '(+)=' from get(OAViewObject.CRITERIA_CONDITION)?
    thanks
    Lei

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • Dynamic where clause with loop statement

    Hi all,
    is it possible to use a dynamic where clause with a loop statement?
    Can you please advise me, how the syntax needs to be?
    Thanks for your suggestions,
    kind regards, Kathrin!

    Hi Kathrin,
               If u are in ECC 6.0, please go through the code...
              REPORT  zdynamic_select.
    TYPES:
      BEGIN OF ty_sales,
        vbeln  TYPE vbak-vbeln,            " Sales document
        posnr  TYPE vbap-posnr,            " Sales document item
        matnr  TYPE vbap-matnr,            " Material number
        arktx  TYPE vbap-arktx,            " Short text for sales order item
        kwmeng TYPE vbap-kwmeng,           " Order quantity
        vkorg TYPE vbak-vkorg,             " Sales organization
        kunnr TYPE vbak-kunnr,             " Sold-to party
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
      END OF ty_sales.
    DATA :
      gt_sales TYPE STANDARD TABLE OF ty_sales,
      wa_sales TYPE ty_sales.
    DATA: ob_select TYPE REF TO cl_rs_where.
    DATA: ob_from   TYPE REF TO cl_rs_where.
    DATA: ob_where  TYPE REF TO cl_rs_where,
          gv_source TYPE abapsource.
    START-OF-SELECTION.
    *Step 1 : Prepare the select fields.
      PERFORM zf_build_select.
    *Step 2 : Build the from clause for the select
      PERFORM zf_build_from.
    *Step 3 : Build the where clause for the select
      PERFORM zf_build_where.
    *Step 4 : Execute the dynamic select
      SELECT (ob_select->n_t_where)
          FROM (ob_from->n_t_where)
            INTO CORRESPONDING FIELDS OF TABLE gt_sales
            WHERE (ob_where->n_t_where).
      LOOP AT gt_sales INTO wa_sales.
        WRITE :   /5 wa_sales-vbeln,
                  15 wa_sales-vkorg,
                  20 wa_sales-kunnr,
                  40 wa_sales-netwr,
                  50 wa_sales-posnr,
                  60 wa_sales-matnr,
                  70 wa_sales-arktx,
                  90 wa_sales-kwmeng.
      ENDLOOP.
    *&      Form  zf_build_select
    FORM zf_build_select .
      CREATE OBJECT ob_select.
    *Build the table name/field name combination
    *Add Sales order header fields
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'VBELN'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'VKORG'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'KUNNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'NETWR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
    *Add Sales order item fields
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'POSNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'MATNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'ARKTX'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'KWMENG'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
    ENDFORM.                    " zf_build_select
    *&      Form  zf_build_from
    FORM zf_build_from .
      CREATE OBJECT ob_from.
    *Add opening bracket
      CALL METHOD ob_from->add_opening_bracket
      CLEAR gv_source.
    *Add the join condition.This can be made
    *fully dynamic as per your requirement
      gv_source = 'VBAK AS VBAK INNER JOIN VBAP AS VBAP'.
    *Add the where line
      CALL METHOD ob_from->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
    *Add the join condition.This can be made
    *fully dynamic as per your requirement
      gv_source = 'ON VBAKVBELN = VBAPVBELN'.
    *Add the where line
      CALL METHOD ob_from->add_line
        EXPORTING
          i_line = gv_source.
    *Add the closing bracket
      CALL METHOD ob_from->add_closing_bracket
    ENDFORM.                    " zf_build_from
    *&      Form  zf_build_where
    FORM zf_build_where .
      DATA :
      lv_field TYPE REF TO data,
      lv_field_low TYPE REF TO data,
      lv_field_high TYPE REF TO data.
      CREATE OBJECT ob_where.
    *Add the field VBELN : Sales Document
    *Use this method if you want to assign a single value to a field
    *Set the value for VBELN : Sales Document Number
    CALL METHOD ob_where->add_field
       EXPORTING
         i_fieldnm  = 'VBAK~VBELN'
         i_operator = '='
         i_intlen   = 10
         i_datatp   = 'CHAR'
       IMPORTING
         e_r_field  = lv_field.
    CALL METHOD ob_where->set_value_for_field
       EXPORTING
         i_fieldnm = 'VBAK~VBELN'
         i_value   = '0000120020'.
    *Use this method if you want to assign a range of values
    *Set a range for the Sales Document number
      CALL METHOD ob_where->add_field_between_2values
        EXPORTING
          i_fieldnm      = 'VBAK~VBELN'
          i_intlen       = 10
          i_datatp       = 'CHAR'
        IMPORTING
          e_r_field_low  = lv_field_low
          e_r_field_high = lv_field_high.
      CALL METHOD ob_where->set_2values_for_field
        EXPORTING
          i_fieldnm    = 'VBAK~VBELN'
          i_value_low  = '0000120020'
          i_value_high = '0000120067'.
    *Set the 'AND' Clause
      CALL METHOD ob_where->add_and.
    *Add the field MATNR : Material
      CALL METHOD ob_where->add_field
        EXPORTING
          i_fieldnm  = 'MATNR'
          i_operator = '='
          i_intlen   = 18
          i_datatp   = 'CHAR'
        IMPORTING
          e_r_field  = lv_field.
    *Set the value for the Material field
      CALL METHOD ob_where->set_value_for_field
        EXPORTING
          i_fieldnm = 'MATNR'
          i_value   = '000000000050111000'.
    *Set the 'AND' Clause
      CALL METHOD ob_where->add_and
    *Add the field VKORG
      CALL METHOD ob_where->add_field
        EXPORTING
          i_fieldnm  = 'VKORG'
          i_operator = '='
          i_intlen   = 4
          i_datatp   = 'CHAR'
        IMPORTING
          e_r_field  = lv_field.
    *Set the value for VKORG : Sales Organization
      CALL METHOD ob_where->set_value_for_field
        EXPORTING
          i_fieldnm = 'VKORG'
          i_value   = 'GMUS'.
    ENDFORM.                    " zf_build_where

Maybe you are looking for

  • How to define Interfaces in SAP PI

    HI Experts, I am kind of very new to SAP PI  topic and hear  we doing an  new SAP implementation project where the existing infrastructure is transformed to SAP. So , in this process we have analyze the different existing  interfaces like which one s

  • System Crashes after Blue Dots

    It's mainly light blue dots that sometimes appear in small parts of contrast, like for example along the shadow of a window or something. Then if time goes by the blue dots become so many that they're all over my screen. They start creeping all over

  • What is use of % symbol in JSP

    What is use of % symbol in JSP? Please reply

  • 9.0.3 / BC4J / JSP /  Error: IMW-00008 ??

    Hello! During migrating from JDEV/BC4J 9.0.2 to 9.0.3.10.33 i get the following Exception (under 9.0.2 it works fine): I 'm executing "Commit" after updating the row in DataHandlerComponent.jsp. At this point, the exception is thrown. DataHandlerComp

  • Bank Accounts-Deutsche Bank

    Hi I'm researching about Cash. I still don't understand how configure. I configure according to document: B46- Cash Management Germany. Financial supply chain management  Cash and liquidity management  Cash Management  Structuring  Groupings  De