Combine two date field into one timestamp field

Hello all,
I need help combining two date fields into one timestamp field.
I have separate Date and Milliseconds fields and want to
combine to one Timestamp field can some suggest sql???

This is my data
01 JAN 1989 12:01:00.001 AM
this is my insert drag_time is a timestamp field in another schema
INSERT
INTO DRAG (drag_time)
SELECT to_char(drag_time, 'DD MON YYYY HH12:MI:SS')||(drag_second)||to_char(drag_time, ' AM')
FROM sa.drag;
This is the error
ERROR at line 3:
ORA-01855: AM/A.M. or PM/P.M. required

Similar Messages

  • Search view : Combine two search views into one serch view

    Hi ,
    We have a requirement for combining two search views into one and display single result view consisting of some fields from One search and few fields from other search.
    Ex. There are two seperate search views for Oppotunity and Quotation. Now we want to combine search views of both into one search view with selected fields and then display a single result view with combined fields from both result views .
    Kindly suggest me the steps I can follow to achieve the same.
    Thanks,
    Madhura

    Hi,
    This is possible by creating dynamic views in a window.
    1)create views you required.
    2)create a tray in the view 1 and a link and set the properties.
    3)create an outbound plug for the view1 and save the application.
    4)create one more link in the tray for view1 and set the properties and create one more outbound plug.
    5)go the main view view and create 2nd tray and create a UI container element in it.
    6) now embed view1 and view2 in the container .........................
    <removed_by_moderator>
    regards,
    Muralidhar .C
    Edited by: Stephen Johannes on Jan 26, 2010 7:53 AM

  • Reg: Combining two display lists into one list

    Dear All,
    i want to combine two display lists into one display list. Please give the idea for this one issue.
    *****************dispaly list 1 starting here*********************
    *&      Form  F_006_DISPLAY_LIST
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM F_006_DISPLAY_LIST.
    *  TABLES : LFA1 .
      DATA : V_DEBIT_TOTAL TYPE P DECIMALS 2 ,
             V_CREDIT_TOTAL TYPE P DECIMALS 2 ,
             V_CLOSE_BAL TYPE P DECIMALS 2 .
      DATA : V_CNT TYPE I .
      SORT ITAB_OPG BY LIFNR.
      LOOP AT ITAB_OPG.
        NEW-PAGE.
    * Displaying Vendor Name
        SELECT SINGLE NAME1 FROM LFA1 INTO LFA1-NAME1 WHERE
                                                 LIFNR EQ ITAB_OPG-LIFNR .
        FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
        WRITE:/2 'Vendor Code:' ,
                 ITAB_OPG-LIFNR  ,
              40 LFA1-NAME1 .
        CLEAR : LFA1 .
        WRITE :/(190) SY-ULINE .
    * Displaying Opening Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
        READ TABLE ITAB_OPG WITH KEY LIFNR = ITAB_OPG-LIFNR .
        IF ITAB_OPG-BAL LE 0 .
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  171(18) ITAB_OPG-BAL .
        ELSE.
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  151(18) ITAB_OPG-BAL .
        ENDIF.
        WRITE :/(190) SY-ULINE .
    * Displaying Line Items
        LOOP AT ITAB_DISPLAY WHERE LIFNR EQ ITAB_OPG-LIFNR.
          V_CNT = SY-TABIX MOD 2.
          IF V_CNT EQ 0.
            FORMAT COLOR COL_NORMAL INTENSIFIED ON.
          ELSE.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          ENDIF.
    * Selecting Bank Name and Cheque Number
          SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
                               FROM PAYR WHERE
                        ZBUKR EQ P_BUKRS AND
                        VBLNR EQ ITAB_DISPLAY-BELNR AND
                        LIFNR EQ ITAB_DISPLAY-LIFNR .
          SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
                 T012 WHERE BUKRS EQ P_BUKRS AND
                            HBKID EQ PAYR-HBKID.
          SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
                            BANKS EQ T012-BANKS AND
                            BANKL EQ T012-BANKL .
          WRITE :/2 ITAB_DISPLAY-BUDAT ,
                 14 ITAB_DISPLAY-BELNR ,
                 26 ITAB_DISPLAY-BLDAT ,
                 40 ITAB_DISPLAY-XBLNR ,
                 58(16) PAYR-CHECT ,
                 75 BNKA-BANKA ,
                105(40) ITAB_DISPLAY-SGTXT ,
                146(4) ITAB_DISPLAY-BLART .
    * Determinig Debit or Credit
          IF ITAB_DISPLAY-SHKZG EQ 'S'.
            V_DEBIT_TOTAL = V_DEBIT_TOTAL + ITAB_DISPLAY-DMBTR.
            WRITE:151(18)  ITAB_DISPLAY-DMBTR ,
                  171(18)  SPACE .
          ELSEIF ITAB_DISPLAY-SHKZG EQ 'H'.
            V_CREDIT_TOTAL = V_CREDIT_TOTAL + ITAB_DISPLAY-DMBTR.
            WRITE:151(18) SPACE ,
                  171(18)  ITAB_DISPLAY-DMBTR .
          ENDIF.
          CLEAR : T012 , BNKA , PAYR .
        ENDLOOP.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.
        WRITE:/(190) SY-ULINE.
    * Displaying Debit and Credit Totals
        WRITE:/125 TEXT-001 ,
           151(18) V_DEBIT_TOTAL ,
           171(18) V_CREDIT_TOTAL .
        WRITE:/(190) SY-ULINE.
    * Displaying the Closing Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        V_CLOSE_BAL = ITAB_OPG-BAL + V_DEBIT_TOTAL - V_CREDIT_TOTAL .
        IF V_CLOSE_BAL GT 0.
          WRITE:/122 TEXT-002 ,
             151(18) V_CLOSE_BAL NO-SIGN.  " D00K909674
        ELSEIF V_CLOSE_BAL LE 0.
          WRITE:/122 TEXT-002 ,
             171(18) V_CLOSE_BAL NO-SIGN.  " D00K909674
        ENDIF.
        CLEAR : V_CLOSE_BAL.
      ENDLOOP.
    ENDFORM.                               " F_006_DISPLAY_LIST
    *****************dispaly list 1 ending here*********************
    *****************dispaly list 2 starting here*********************
    *&      Form  F_006_DISPLAY_LIST1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM F_006_DISPLAY_LIST1 .
    TABLES : KNA1 .
      DATA : V_DEBIT_TOTAL1 TYPE P DECIMALS 2 ,
             V_CREDIT_TOTAL1 TYPE P DECIMALS 2 ,
             V_CLOSE_BAL1 TYPE P DECIMALS 2 .
      DATA : V_CNT1 TYPE I .
      SORT ITAB_OPG1 BY KUNNR.
      LOOP AT ITAB_OPG1.
        NEW-PAGE.
    * Displaying Vendor Name
        SELECT SINGLE NAME1 FROM KNA1 INTO KNA1-NAME1 WHERE
                                                 KUNNR EQ ITAB_OPG1-KUNNR .
        FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
        WRITE:/2 'Customer Code:' ,
                 ITAB_OPG1-KUNNR  ,
              40 KNA1-NAME1 .
        CLEAR : KNA1 .
        WRITE :/(190) SY-ULINE .
    * Displaying Opening Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
        READ TABLE ITAB_OPG1 WITH KEY KUNNR = ITAB_OPG1-KUNNR .
        IF ITAB_OPG1-BAL1 LE 0 .
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  171(18) ITAB_OPG1-BAL1 .
        ELSE.
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  151(18) ITAB_OPG1-BAL1 .
        ENDIF.
        WRITE :/(190) SY-ULINE .
    * Displaying Line Items
        LOOP AT ITAB_DISPLAY1 WHERE KUNNR EQ ITAB_OPG1-KUNNR.
          V_CNT1 = SY-TABIX MOD 2.
          IF V_CNT1 EQ 0.
            FORMAT COLOR COL_NORMAL INTENSIFIED ON.
          ELSE.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          ENDIF.
    * Selecting Bank Name and Cheque Number
          SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
                               FROM PAYR WHERE
                        ZBUKR EQ P_BUKRS AND
                        VBLNR EQ ITAB_DISPLAY1-BELNR AND
                        KUNNR EQ ITAB_DISPLAY1-KUNNR .
          SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
                 T012 WHERE BUKRS EQ P_BUKRS AND
                            HBKID EQ PAYR-HBKID.
          SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
                            BANKS EQ T012-BANKS AND
                            BANKL EQ T012-BANKL .
          WRITE :/2 ITAB_DISPLAY1-BUDAT ,
                 14 ITAB_DISPLAY1-BELNR ,
                 26 ITAB_DISPLAY1-BLDAT ,
                 40 ITAB_DISPLAY1-XBLNR ,
                 58(16) PAYR-CHECT ,
                 75 BNKA-BANKA ,
                105(40) ITAB_DISPLAY1-SGTXT ,
                146(4) ITAB_DISPLAY1-BLART .
    * Determinig Debit or Credit
          IF ITAB_DISPLAY1-SHKZG EQ 'S'.
            V_DEBIT_TOTAL1 = V_DEBIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
            WRITE:151(18)  ITAB_DISPLAY1-DMBTR ,
                  171(18)  SPACE .
          ELSEIF ITAB_DISPLAY1-SHKZG EQ 'H'.
            V_CREDIT_TOTAL1 = V_CREDIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
            WRITE:151(18) SPACE ,
                  171(18)  ITAB_DISPLAY1-DMBTR .
          ENDIF.
          CLEAR : T012 , BNKA , PAYR .
        ENDLOOP.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.
        WRITE:/(190) SY-ULINE.
    * Displaying Debit and Credit Totals
        WRITE:/125 TEXT-001 ,
           151(18) V_DEBIT_TOTAL1,
           171(18) V_CREDIT_TOTAL1 .
        WRITE:/(190) SY-ULINE.
    * Displaying the Closing Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        V_CLOSE_BAL1 = ITAB_OPG1-BAL1 + V_DEBIT_TOTAL1 - V_CREDIT_TOTAL1 .
        IF V_CLOSE_BAL1 GT 0.
          WRITE:/122 TEXT-002 ,
             151(18) V_CLOSE_BAL1 NO-SIGN.  " D00K909674
        ELSEIF V_CLOSE_BAL1 LE 0.
          WRITE:/122 TEXT-002 ,
             171(18) V_CLOSE_BAL1 NO-SIGN.  " D00K909674
        ENDIF.
        CLEAR : V_CLOSE_BAL1.
      ENDLOOP.
    ENDFORM.                    " F_006_DISPLAY_LIST1
    *****************dispaly list 2 ending here*********************
    Thanks,
    Sankar M

    Hi,
    Can you post it as two halves ?
    Regards,
    Swarna Munukoti

  • Combining two sales documents  into one billing document

    Hi Friends,
    I need to combine two sales document into one billing document. Header data is same in both sales document.
    I have set factory calendar in the payer master.
    Tried for data transfer rotine at copy control of item level. But was not sure which routine to be set.
    Please let me know, what all settings are required to create one combine billing document.
    Regards
    Suman

    Hi,
    Is it delivery based billing or order based billing?
    2 orders / 2 deliveries and 1 invoice.
    For the above situation you need to write a routine which eliminates document number difference for Reference and Allocation.
    If you do not have different customer purchase orders for these two sales orders and in your copy control from delivery to billing your assignment and reference numbers are blank then system will club these deliveries and create one sales order.
    Else you need to eliminate these by writing a copy control routine and assign it at the header level.
    Hope this helps.  Pl. revert in case of further clarifications.
    Thanks
    Krishna.

  • How can I combine two itunes accounts into one?

    How can I combine two itunes accounts into one?

    Items purchased from the iTunes Store are permanently associated with the account from which they were originally purchased.  Apple provides no way to change this.
    However, if you wish to put content from two accounts into a single iTunes library, you can easily do so.  Use the command File > Add File (or Folder) to Library.

  • How do I combine two slide shows into one?

    I need to combine two slide shows into one and put the whole thing into a loop for a Kiosque. Can someone help?

    Drag and drop the slides from the Thumbnail viewer (left side of the window) from one Keynote to the other. They should copy with all the Actions and Transitions still in place. Then go to Inspector>Document Tab and check the box that says to Loop slideshow.

  • Is it possible to combine two pivot report into one ?..

    Is it possible to combine two pivot report into one ?..
    Then trying to display a chart or table result.

    Thanks for the reply.
    Let me explain it briefly. I am creating a Report 1 based on one fitler condition and second report is created based on second filter condition.
    I have similar column (time periods) in the both report. Then measure column has to combine and show as single report.
    This is my requirement.

  • How do I combine two PDF files into one?

    I want to merge two PDF files into one to make things easier when I take the file(s) to a professional printer.
    Can I do this in Preview?
    Thanks.

    You can't do in Preview.
    You can combine individual PDFs into one PDF using one of these freeware utilities.
    PDFMergeX @ http://www.malcom-mac.com/blog/pdfmergex/
    joinPDF @ http://www.macupdate.com/info.php/id/16604
    Combine PDFs @ http://www.monkeybreadsoftware.de/Freeware/CombinePDFs.shtml>
    PDFLab (join & split) @ http://pdflab.en.softonic.com/mac
     Cheers, Tom

  • How do I combine two different libraries into one?

    I have three devices, one iphone and two ipods. How can I combine all three libraries into one single library. Is this possible?

    Choose the library connected to the iPhone, import the media content from the other one/two libraries. DeDupe.
    I've written a script called DeDuper which can help with the last bit. See this  thread for background.
    tt2

  • How do i combine two user accounts into one

    how do i combine two user accounts into one

    Drag one account's home folder from the Users folder to the other account's desktop, provide your administrator password, and then move your files from it.
    (75344)

  • Should I combine two 1Tb drives into one logical 2Tb drive or use one 1Tb drive for system/apps and move /users to the other 1Tb drive?  (I'd like ease of b/u too.)

    Hello,
    I have two 1Tb drives in my Mini, the first is full and the second one empty.  (I've been using the 2nd for Time Machine but the full source from dirve 1 soon has Time Machine complaining.)  I am contemplating whether to form one 2Tb logical drive from the two 1Tb drives or segregate their use, i.e. use the first 1Tb drive to hold the system and applications while moving the /users directory tree to the second 1Tb drive?
    I'm assuming both are straight forward to do accomplish but have nagging doubts about segregating drive usage, will moving the /users directory tree to the second 1Tb drive:
    impact apps which might otherwise expect to see particulat fies and directories in specific user related locations on the system drive;
    hinder backing up (by having to setup two separate Time Machine activities)?
    Finally, is there a better 3rt option?
    Thanks,

    Thanks and sorry Allan,
    The supplementary questions would arise should I NOT chose to combine the separate drives into a larger logical one but to keep one of the two drives for system/apps and the other for users data...  I assumed that segregating drive usagel like this might reult in issues with apps which might expect to see some user directories/files on the same drive as the system/apps.  similarly, with two physical drives, I'd be looking to managing separate Time Mchines.  (I have a few 2Tb pocket drives for backups.)
    Final question - if I do combine into a single logical drive (for system, apps, /users ... the whole lot), would I have any problem getting this logical one working from a Time Machine backup?  I ask that this backup was taken from the 1Tb physical drive and now I'd be looking to put it back onto a 2Tb logicl drive.
    Thanks,

  • Need help in combining two similair SQLs into one

    DB Version:10gR2
    I need to combine the following two queries into one query and return the following three columns
    Unprocessed Quantity1,Unprocessed Quantity2, Total Uprocessed Cost
    Unprocessed Quantity1 can be determined using
    select t.ITEM, sum(t.QTY)
      from (select cd.ITEM_ID ITEM, cd.ACTL_QTY QTY
              from CONVEY_HDR ch, CURRENT_INVN cd, ALLOC_HDR ah
             where ........
            UNION
            select sd.ITEM_ID ITEM, sd.INVN_QTY QTY
              from shp_dtl pd
            UNION
            Select item_id, inv_qty from another table
        GROUP BY.....
    ITEM        SUM(T.QTY)
    88JAT                25
    000002395           1
    300108396          27
    000004397           7
    73984290           15Unprocessed quantity2 can be determined using
    select t.ITEM, sum(t.QTY)
         from (select cd.ITEM_ID ITEM, cd.ACTL_QTY QTY
                 from CONVEY_HDR ch, CURRENT_INVN cd, ALLOC_HDR ah
        where rownum<6
       group by t.ITEM
       order by t.ITEM;
    ITEM        SUM(T.QTY)
    189436171           2
    009438837         160
    000040685          16
    000032410          18Total Unprocessed Cost can found using the sum of Quantities for a particular Item from above two queries multiplied by
    ITEM_COST for that ITEM (which is found in ITEM_DTL table). For every item; ITEM_DTL.item_id=CARTON_dTL.carton_id
    Total Unprocessed Cost= (Unprocessed Quantity1+Unprocessed Quantity2)*ITEM_DTL. ITEM_COST
    Note: Unprocessed Quantity2 query looks very similair to first SQL in UNION of Unprocessed Quantity1, but ah.STAT_CODE < 90 for Unprocessed Quantity2 query
    Edited by: user636669 on Jan 14, 2009 10:40 AM
    Edited by: user636669 on Jan 14, 2009 10:57 AM
    Corrected typo
    Edited by: user636669 on Jan 14, 2009 7:07 PM

    Hi,
    Put the two queries you posted in sub-queries. You can then use their result sets as if they were tables.
    Do something like this:
    WITH  uq1  AS
        select t.ITEM, sum(t.QTY) AS total
          from (select cd.ITEM_ID ITEM, cd.ACTL_QTY QTY
                  from CASE_HDR ch, CASE_DTL cd, ASN_HDR ah
        ... the rest of your first query goes here
    ,     uq2  AS
        select t.ITEM, sum(t.QTY)  AS total
             from (select cd.ITEM_ID ITEM, cd.ACTL_QTY QTY
                     from CASE_HDR ch, CASE_DTL cd, ASN_HDR ah
        ... the rest of your second query goes here
    SELECT  uq1.item
    ,       uq1.total  AS "Unprocessed Quantity1"
    ,       uq2.total  AS "Unprocessed Quantity2"
    ,       (uq1.total + uq2.total) * dtl.item_cost
                       AS "Total Uprocessed Cost"
    FROM    uq1
    JOIN    uq2               ON uq1.item = uq2.item
    JOIN    item_dtl   dtl    ON uq1.item = dtl.item;If some items are in uq1 but not in uq2 (or vice-versa), then you'll probably want to do outer joins.
    I don't have any of the tables used, so I can't test this myself.
    If you need more help. then post a little sample data from each of the tables, and the results you want from that data.
    It looks like you're doing the same join in each of your original queries.
    You can add another sub-query that does that join once, and then use that sub-query in sub-queries uq1 and uq2.

  • How do I combine two user accounts into one account?

    When we originally set-up our iMac, I set-up two accounts for my wife and I. Since then it has been a royal pain with music and applications sharing. How do I merge the two accounts into one?

    I found an answer to this by searching on "merging two accounts" rather than "combining two accounts." BTW, it's a little mini-nightmare if you only use "combine" on both Google and Apple support. At least this post might help others avoid the same fate.
    Here's where to go to find the answer: http://discussions.apple.com/message.jspa?messageID=5629676#5629676

  • How do you combine two separate paths into one?

    I have two two separate paths that overlap and I want to combine into one path. How do I do that?

    I've now worked it out thanks it thanks. I highlighted the main path and the outer path to the second one and clicked on merge shape components. Then highlighted the inner path and did the same and this has worked.

  • Can I combine two iTunes accounts into one?

    Hello. I have an iPod touch, but to download and install apps, I have to use my dad's account to download. Is it possible to combine two together into one( I just created an Apple ID. ) thanks for answering!0.0

    this Apple article says no:
    http://support.apple.com/kb/he37
    "I have multiple Apple IDs. Is there a way for me to consolidate them into a single Apple ID?
    At this time, Apple IDs cannot be consolidated. "

Maybe you are looking for

  • Broadband novice needs help & advice

    Hi, I am new to this forum and looking for help. I have a BT Home Hub (plugged into master bt socket) and connect to it via my laptop wirelessly. Our printer also connects in wirelessly. We have slow broadband speeds generally (130mbps top). Our phon

  • Tcode to find the fields ,tables based on description of fields

    hi folks, tcode to find the fields ,tables based on description of fields,POINTS  will be awarded for the answers ,plz give reply.

  • Trying to Optimize Servers

    I have a Compaq ML570 with 4 Processors and I have another server that is A ML570 with 2 processors.In essbase the calculations on the server with 2 processors calcualate much faster...in fact one calculation was 47 minutes faster on the server with

  • Switch over in an environment with multiple standby

    i currently have one primary and one physical standby, I am due to create standby no2 on a different server and then use the new standby as primary ( migrate current primary to a new system) . I like to know 1. if i can create new standby using backu

  • Is the late-2012 iMac's built in Wi-Fi reliable?

    I read a lot about iMac's built-in Wi-Fi dropping out constantly and just being unreliable basically. So can anyone tell me otherwise? Suggest wireless adapters to improve the iMac's Wi-Fi if possbile. Can the Airport Express Base Station in its Prox