SQL*Plus COPY command does not work

SQL*Plus COPY command does not work in SQL Developer. I am using SQL Developer 1.5.1 on Windows XP.
copy from <source_db_connection> to <target_db_connection> create <target_tab_name> using select * from <source_tab_name>
Does it work on different versions of SQL Developer ?
Anyone had any success in trying COPY command in SQL Developer?
Thanks in advance.

While it hasn't been updated for v1.5, this page lists the supported SQL*Plus commands. COPY is explicitly listed as not supported.
theFurryOne

Similar Messages

  • SQL*Plus 'Copy' command and LONG datatypes

    Hi. I'm using Oracle 9.2.0.5 and wanna copy LONG to LONG without using an Interface in VB or any other programming language.
    Some of the fields (plain text) are greater than 32 Kb, and I tried the SQL*Plus 'Copy' command, without success.
    (For compatibility reasons I can't convert LONG to CLOB, I need to copy LONG to LONG)
    This is the example I'm working with:
    Table Source_LONG (ID number, DATA long)
    Table Destination_LONG (ID number, DATA long)
    The SQL*Plus command: (connected from test_database@environment)
    set long 100000
    copy from test_database/test_database@environment insert destination_long (id,data)
    I tried using both FROM and TO, but same results.
    The fields are copied into destination_long, but they are
    truncated at 32768 bytes, even with the LONG variable set to 100000. Any ideas ?
    Thanks.

    I'm working with 2 similar tables with this structure:
    SOURCE_LONG (ID number, DATA long)
    DESTINATION_LONG (ID number, DATA long)
    SOURCE_LONG contains two rows:
    ID DATA
    1 hello
    3 ....text bigger than 32kb...
    I tried your solution and it insert 2 rows, but only the ID is filled. The DATA is empty in both cases :-(
    insert into destination_long(id,data) (select id,to_lob(data) from source_long);

  • ORA-01401 on execution SQL*Plus Copy command

    I looking solution for strange problem :
    I having two database created with AL32UTF8 character-set ; current application design are that we loading data throw SQL Loader and than transferring loaded data from one database to another using SQL*Plus copy command.
    Now , we having two tables , declared 100% identically , with respect to NLS and CHAR semantics (all varchar fields having CHAR inside length).
    At attempt to transfer data , with SQL*Plus Copy command I'm receiving next output :
    ERROR:
    ORA-01401: inserted value too large for column
    If I'm trying to transfer data via DB link , and this succeeds , or throw exp/imp utilities it also works .
    Database servers are 9.2 (i tryied with 9.2.0.6 or 9.2.0.8) ; client side were 9.2.0.8 , 10.1.0.5 ...
    On client side NLS_LANG variable are set to AMERICAN_AMERICA.AR8MSWIN1256 (we working on project who needs to support arabic language)
    Did anyone encountered same problem ? Any One ?

    it could be that the column of the table that you are trying to insert the data has a small length.

  • Delete command does not work

    delete command does not work.. it just freezes neither roll back happens.. please advice

    Always: If possible, give the exact command & output from your terminal, pefrerrable with copy & paste. We cannot see your screen and magically spot the problem.
    In general, you should also include your database version and OS, although I doubt that this is relevant in this particular case.
    Kind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • Copy fuction does not work

    When I try to make a copy of something the arrow just keeps spinning and never allows me to copy.

    Hi , Welcome to the HP Forums! I understand that the copy function does not work with your HP Envy 5530. I am happy to look into this copying issue for you!  So I have a better understanding of your question. Is this happening when printing from the computer? Or, when you place a sheet of paper on the glass and select copy?  If you are trying to print from the computer, what Operating System do you have? Windows or Mac? What version? If you do not know the Operating System you are using, please visit this website. Whatsmyos. In the meantime, please make sure the printer's power cable is plugged directly into the wall outlet, and not a surge protector. Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector. This applies to Inkjet printers as well. Also, you will want to make sure the printer's firmware is up-to-date. Getting Printer Updates for HP Photosmart 5520 e-All-in-One, HP ENVY 5530 e-All-in-One, and HP Deskjet Ink Advantage 4510 and 5520 e-All-in-One Printer Series. Thank you for posting, and hope to hear from you soon!  “Please click the Thumbs up icon below to thank me for responding.”

  • My "undo" command does not work in the new version of GB.  Please advise.  This is a real problem.  I had no issues with  GB from iLife 11.

    My "undo" command does not work in the new version of GB.  Please advise.  This is a real problem.  I had no issues with  GB from iLife 11.

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • I have a MacBookPro 2011. The Empty Trash command does not work. I mean I can not empty my trash

    I have a MacBookPro 2011. The Empty Trash command does not work. I mean I can not empty my trash. what should I do? since now there are more than 5000 items accumulated in my trash.

    Thanks everybody for your comments.
    I just found a way out from the disscussion : I can't use empty trash or secure empty trash.
    The same formula proposed by Zyriab solved my question.
    This solved my questionRe: I can't use empty trash or secure empty trash.

  • "FOR REC IN CURSOR(PARAMETERS) LOOP" command does not work. Why?

    Hi to all.
    It's a pleasure to receive your help.
    In "FOR REC IN CURSOR(PARAMETERS) LOOP" command although the query return value does not enter the loop.
    Sounds simple, but I'm not seeing the flaw...
    Suggestions?
    Version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Thank in advance,
    Filippe

    Filippe Soares Roza wrote:
    Hi to all.
    It's a pleasure to receive your help.
    In "FOR REC IN CURSOR(PARAMETERS) LOOP" command although the query return value does not enter the loop.
    Sounds simple, but I'm not seeing the flaw...
    Suggestions?
    Version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Thank in advance,
    Filippe
    see a picture of my car that does not work.
    Tell me how to make my car go.
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • PL/SQL: Setting the Encoding does not work

    I'm traying to create my XML document in PL/SQL but the method
    setCharset('ISO-8859-1')
    does not work and is ignored. it works only with
    setCharset('UTF8').
    Does anybody know why??? Is this a bug??
    Thanks,
    Ashkan.

    Sorry, but all this does not work on 8.1.6.
    Current DB charset name is:
    SELECT VALUE FROM V$NLS_PARAMETERS
    WHERE PARAMETER = 'NLS_CHARACTERSET';
    VALUE
    WE8ISO8859P1
    I tried (step by step) the following:
    xmldom.setVersion( doc, '1.0' ); -- Works !
    xmldom.setCharset( doc, 'iso-8859-1' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'ISO-8859-1' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'ISO' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'WE8ISO8859P1' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'we8iso8859p1' ); -- DOES NOT WORK
    xmldom.setCharset( doc, '8859_1' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'US-ASCII' ); -- DOES NOT WORK
    xmldom.setCharset( doc, 'UTF8' ); -- Works !
    -- Build the DOM
    xmldom.writeToFile( doc, files.full_fname_xml, 'ISO-8859-1' ); -- DOES
    NOT WORK
    xmldom.writeToFile( doc, files.full_fname_xml, 'WE8ISO8859P1' ); -- DOES
    NOT WORK
    xmldom.writeToFile( doc, files.full_fname_xml, 'we8iso8859p1' ); -- DOES
    NOT WORK
    Alex

  • SQL-Server detection/discovery does not work in win 10 build 10041

    Hello,
    I'm using the default .NET-function to detect SQL-server-instances in the network. It works fine in win xp, win7, win8 up to win 2012r2. It also works in earlier win 10 builds, but it's broken in build 10041.
    It's reproduceable with the powershell-call
    [System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources()
    On other systems the function call takes about 10 to 15 seconds before returning a list of SQL instances in the network. Under win 10 build 10041 it returns immedeately without any results.
    Please fix this problem before the final build!

    Share: The abiltity to place a link to the feedback-"post" somewhere else ... facebook, twitter, or this forum here.
    I've only a virtual machine with windows 10 installed. So it's really annoying, that I have to log on on to check the state or the "me too" count of my feedback-post. Would be great if this post is reachable through the web from other (pre windows
    10) machines.
    Answer: The ability to reply to the feedback-"post". like "it's solved now", "it does not work with build xxxxx", "i can't reproduce", "we're working on a bugfix"

  • "Place" command does not work

    Hi,
    I changed some Applescripts over to InDesign CS5 from CS3 and now they do not work. Basically all the Applescript does is place a graphic in a rectangle and size it to fit. The problem is that I keep getting an error that says, ...
    Adobe InDesign CS5 got an error: "Macintosh HD:Users:User:Desktop:untitled folder:1023SW.tif" doesn’t understand the place message.
    I get the exact same error when I run the "Image Catalogue" script that came with Adobe InDesign CS5. The script does everything but place the image. It works just fine in CS3.
    Can anyone please help me with this? A sample of the script is below. This is the one that comes with CS5 but it does not work
    set myFile to item myCounter of myFiles
                set myRectangle to rectangle myCounter of myDocument
                tell myRectangle
                    set myGraphic to place (myFile as string)
                    --The place command returns a list, so get the
                    --first item of the list.
                    set myGraphic to item 1 of myGraphic
                    set label to myFile as string
                    if myFitProportional is true then
                        fit given proportionally
                    end if
                    if myFitCenterContent is true then
                        fit given center content
                    end if
                    if myFitFrameToContent is true then
                        fit given frame to content
                    end if
                end tell
    Any help would be appreciated.

    OK, I figured it out also.
    In case anybody out there is having the same problem, this is the line of code I used:
    set myGraphic to place (myArtFile as alias)
    So I just changed "as string" to "as alias" and it worked.

  • SQL Plus Bug/Question: 'COMPUTE' command does not work in script.(BUG?!)

    Good Day to ALL!
    I have a script of SQLPlus that creates a report. I have 8/9 numeric columns which are 'SUM'ed up thru 'COMPUTE' command. It works for all BUT 2 columns. If I put these two columns, compute does not take affect. If I remove these two columns ( just cut) 'COMPUTE' works fine!!! These two coulumns use DB Function. But I have other column that also use DB Function. These two columns has some extra additions. Any thing wrong with the script/column defn.
    Thanks - Pradip (Pradip Biswas @Singapore) Could you pl. reply to [email protected]
    Here is bit of script. Sorry about the length of the cut and paste.
    COLUMN OPEN_QTY_BAL           FORMAT 9,99,990          HEADING 'Opening|Qty'           Justify LEFT
    COLUMN OPEN_QTY_VALUE          FORMAT 99,999,990      HEADING 'Opening|S$'           Justify LEFT
    COLUMN PO_RECEIPTS_QTY      FORMAT 99,990          HEADING 'PO Rec|QTY '          Justify LEFT
    COLUMN PO_RECEIPTS_QTY_VALUE     FORMAT 9,999,990      Heading 'PO Rec|S$'           Justify LEFT
    COLUMN MISC_RECEIPTS_QTY     Format 99,990          Heading 'Misc |Qty'          Justify LEFT
    Column MISC_RECEIPTS_QTY_VALUE      Format 9,999,990      Heading 'Misc|S$'          Justify LEFT
    COLUMN WORKORDER_QTY           FORMAT 99,990          HEADING 'WorkOrd|Qty'          Justify LEFT
    COLUMN WorkOrder_QTY_VALUE      Format 9,999,990      HEADING 'WorkOrd|S$'          Justify LEFT
    COLUMN SALES_SHIPMENT_QTY      FOrmat 99,990          Heading 'SalesShip|Qty'          Justify LEFT
    COLUMN SALES_SHIPMENT_QTY_VALUE FOrmat 9,999,990      Heading 'SalesShip|S$'          Justify LEFT
    COLUMN MISC_ISSUE_QTY     Format 99,999          HEADing 'Misc|Qty'          Justify LEFT
    COLUMN MISC_ISSUE_QTY_VALUE Format 9,999,990 heading 'Misc|S$'          Justify LEFT
    COLUMN TRANSFER_QTY          format 99,990          heading 'Transfer|Qty'          Justify LEFT
    COLUMN TRANSFER_QTY_VALUE     format 99,999,990     heading 'Transfer|S$'          Justify LEFT
    COLUMN REVAL_VALUE Format 99,990          Heading 'Reval|S$'          Justify LEFT
    COLUMN ON_HAND_QTY           FORMAT 9,99,990      HEADING 'Closing|Qty'           Justify LEFT
    COLUMN ON_HAND_QTY_VALUE     FORMAT 99,999,999,990      HEADING 'Closing|S$'           Justify LEFT
    REPHEADER on
    REPHEADER left ' GL Period From: &&P_GL_PERIOD_NAME_FROM ' skip left ' GL Period To : &&P_GL_PERIOD_NAME_TO ' skip left ' Inv Org Code : &&P_INV_ORG_CODE ' skip left 'SubInventory Code : &&P_SUBINVENTORY_CODE ' skip 2
    TTITLE left 'H - Inv Inventory Movement Report as at:' TTITLE_DATE RIGHT 'PAGE:' FORMAT 999 SQL.PNO SKIP 2
    BTITLE skip 1 CENTER 'COMPANY CONFIDENTIAL - Printed on ' TTITLE_DATE
    BREAK on REPORT skip 1;
    --rem(1) compute SUM label 'Total' of OPEN_QTY_VALUE PO_RECEIPTS_QTY_VALUE MISC_RECEIPTS_QTY_VALUE WorkOrder_QTY_VALUE SALES_SHIPMENT_QTY_VALUE MISC_ISSUE_QTY_VALUE TRANSFER_QTY_VALUE REVAL_VALUE on report;
    --REM(2) compute SUM label 'Total $S: ' of OPEN_QTY_VALUE REVAL_VALUE on report;
    --REM(3) compute SUM label 'Total $S: ' of OPEN_QTY_VALUE REVAL_VALUE  ON_HAND_QTY_VALUE on report;
    compute SUM label 'Total $S:' of OPEN_QTY_VALUE PO_RECEIPTS_QTY_VALUE MISC_RECEIPTS_QTY_VALUE WorkOrder_QTY_VALUE SALES_SHIPMENT_QTY_VALUE MISC_ISSUE_QTY_VALUE TRANSFER_QTY_VALUE REVAL_VALUE on report;
    WHENEVER SQLERROR EXIT FAILURE
    select
    --     MSI.ORGANIZATION_ID                          ORGANIZATION_ID,
    -- MSI.INVENTORY_ITEM_ID                                   INVENTORY_ITEM_ID,
         MSI.SEGMENT1||'//'||MSI.DESCRIPTION                                   ITEM,
    -- MSI.DESCRIPTION                                             DESCRIPTION,
    All_Item_subinv.SUBINVENTORY_CODE                              SUBINVENTORY,
    MSIV.PRIMARY_UOM_CODE                                        UOM,
         --NVL(MOQ_OPen_BAL.OPEN_QTY_BAL ,0)                               OPEN_QTY_BAL ,
    -- NVL(MOQ_OPen_BAL.OPEN_QTY_BAL,0) * NVL(AVG_ITEM_COST1.ITEM_COST,0)           OPEN_QTY_VALUE,
    (MOQ_OPen_BAL( All_Item_subinv.SUBINVENTORY_CODE,
              MSI.ORGANIZATION_ID,
    MSI.INVENTORY_ITEM_ID,
    '&P_GL_PERIOD_NAME_FROM') )     OPEN_QTY_BAL ,
    (MOQ_OPen_BAL_VAL( All_Item_subinv.SUBINVENTORY_CODE,
              mSI.ORGANIZATION_ID,
    MSI.INVENTORY_ITEM_ID,
    '&P_GL_PERIOD_NAME_FROM')
         )                                             OPEN_QTY_VALUE,
    NVL(AGGREGATED_MTT.PO_RECEIPTS_QTY,0)                              PO_RECEIPTS_QTY,
         NVL(AGGREGATED_MTT.PO_RECEIPTS_QTY_VALUE,0)                          PO_RECEIPTS_QTY_VALUE,
         NVL(AGGREGATED_MTT.MISC_RECEIPTS_QTY,0)                              MISC_RECEIPTS_QTY,
         NVL(AGGREGATED_MTT.MISC_RECEIPTS_QTY_VALUE,0)                          MISC_RECEIPTS_QTY_VALUE,
         NVL(AGGREGATED_MTT.WORKORDER_QTY,0)                              WORKORDER_QTY,
         NVL(AGGREGATED_MTT.WorkOrder_QTY_VALUE,0)                          WorkOrder_QTY_VALUE,
    NVL(AGGREGATED_MTT.SALES_SHIPMENT_QTY,0)                         SALES_SHIPMENT_QTY,
         NVL(AGGREGATED_MTT.SALES_SHIPMENT_QTY_VALUE,0)                         SALES_SHIPMENT_QTY_VALUE,
         NVL(AGGREGATED_MTT.MISC_ISSUE_QTY,0)                              MISC_ISSUE_QTY,
         NVL(AGGREGATED_MTT.MISC_ISSUE_QTY_VALUE,0)                          MISC_ISSUE_QTY_VALUE,
         NVL(AGGREGATED_MTT.TRANSFER_QTY,0)                              TRANSFER_QTY,
         NVL(AGGREGATED_MTT.TRANSFER_QTY_VALUE,0)                         TRANSFER_QTY_VALUE,
         NVL(AGGREGATED_MTT.REVAL_VALUE,0)                              REVAL_VALUE,
              (MOQ_OPen_BAL(All_Item_subinv.SUBINVENTORY_CODE,
              MSI.ORGANIZATION_ID,
    MSI.INVENTORY_ITEM_ID,
    '&P_GL_PERIOD_NAME_FROM')
              +
              nvl(AGGREGATED_MTT.PO_RECEIPTS_QTY,0)      +
              nvl(AGGREGATED_MTT.MISC_RECEIPTS_QTY,0)     +
              nvl(AGGREGATED_MTT.WORKORDER_QTY,0)     +
              nvl(AGGREGATED_MTT.SALES_SHIPMENT_QTY,0)     +
              nvl(AGGREGATED_MTT.MISC_ISSUE_QTY,0)          +
              nvl(AGGREGATED_MTT.TRANSFER_QTY,0)     )                ON_HAND_QTY,
    ((MOQ_OPen_BAL_VAL( All_Item_subinv.SUBINVENTORY_CODE,MSI.ORGANIZATION_ID,MSI.INVENTORY_ITEM_ID,'&P_GL_PERIOD_NAME_FROM'))
    +(nvl( AGGREGATED_MTT.PO_RECEIPTS_QTY_VALUE,0) )     
    +(nvl( AGGREGATED_MTT.MISC_RECEIPTS_QTY_VALUE,0) )
    +(nvl( AGGREGATED_MTT.WorkOrder_QTY_VALUE,0) )
    +(nvl( AGGREGATED_MTT.sALES_SHIPMENT_QTY_VALUE,0) )
    +(nvl( AGGREGATED_MTT.MISC_ISSUE_QTY_VALUE,0) )
    +(nvl( AGGREGATED_MTT.TRANSFER_QTY_VALUE,0) )
    +nvl( AGGREGATED_MTT.REVAL_VALUE,0))                               ON_HAND_QTY_VALUE -- column alias
    FROM
    -- In line View for MSI
    (select distinct MMT.ORGANIZATION_ID, MMT.INVENTORY_ITEM_ID, MMT.SUBINVENTORY_CODE
    From MTL_MATERIAL_TRANSACTIONS      MMT,
    ORG_ORGANIZATION_DEFINITIONS      OOD,
    MTL_ONHAND_QUANTITIES moq
    where
         OOD.organization_code           = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
    AND OOD.inventory_enabled_flag = 'Y'
    AND OOD.operating_unit          = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
    AND OOD.SET_OF_BOOKS_ID          = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
    AND     MMT.ORGANIZATION_ID          = OOD.organization_id
    AND MMT.SUBINVENTORY_CODE          = NVL('&P_SUBINVENTORY_CODE', MMT.SUBINVENTORY_CODE)
    and MMT.ORGANIZATION_ID      = MOQ.ORGANIZATION_ID -- to eliminate consigend items:2007Jan04:PKB
    and MMT.INVENTORY_ITEM_ID = MOQ.INVENTORY_ITEM_ID --,,
    and MMT.SUBINVENTORY_CODE = MOQ.SUBINVENTORY_CODE --,,
    UNION
    Select distinct      MOQ.ORGANIZATION_ID,      MOQ.INVENTORY_ITEM_ID,     MOQ.SUBINVENTORY_CODE
    from      MTL_ONHAND_QUANTITIES                MOQ,
         ORG_ORGANIZATION_DEFINITIONS           OOD2
    WHERE
         OOD2.organization_code           = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
    AND OOD2.inventory_enabled_flag      = 'Y'
    AND OOD2.operating_unit          = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
    AND OOD2.SET_OF_BOOKS_ID          = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
    AND moq.ORGANIZATION_ID          = OOD2.organization_id
    AND moq.SUBINVENTORY_CODE          = NVL('&P_SUBINVENTORY_CODE', moq.SUBINVENTORY_CODE)
    ) ALL_Item_SUBInv,
    MTL_SYSTEM_ITEMS_B MSI,
    Mtl_System_Items_Vl MSIV,
    (SELECT
         MMT.ORGANIZATION_ID ORGANIZATION_ID,
    MMT.INVENTORY_ITEM_ID          INVENTORY_ITEM_ID,
    MMT.SUBINVENTORY_CODE          SUBINVENTORY_CODE,
    -- PO RECEIPTS.
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Purchase order')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('PO Receipt','PO Rcpt Adjust','Return to Vendor')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) PO_RECEIPTS_QTY,
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Purchase order')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('PO Receipt','PO Rcpt Adjust','Return to Vendor')
    THEN
                   NVL(MMT.ACTUAL_COST,0)* nvl(mmt.primary_quantity,0)
                   MMT.TRANSACTION_COST * NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) PO_RECEIPTS_QTY_VALUE,
    -- MISC RECEIPTS.
    SUM( CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Account','Inventory')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Account receipt','Miscellaneous receipt')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) MISC_RECEIPTS_QTY,
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Account', 'Inventory')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Account receipt','Miscellaneous receipt')
    THEN
                   NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
                        MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) MISC_RECEIPTS_QTY_VALUE,
    -- WorkOrder Qty and S$
    SUM( CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Job or Schedule')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('WIP Assembly Return','WIP Assy Completion','WIP component issue','WIP Component Return')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) WORKORDER_QTY,
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Job or Schedule')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('WIP Assembly Return','WIP Assy Completion','WIP component issue','WIP Component Return')
    THEN
                   NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
                        MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) WorkOrder_QTY_VALUE,
    -- Sales Shipment
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ( 'Sales order','RMA')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Sales order issue','Sales Order Pick','RMA Return','RMA Receipt')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) SALES_SHIPMENT_QTY,
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ( 'Sales order','RMA')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Sales order issue','Sales Order Pick','RMA Return','RMA Receipt')
    THEN
                   NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
                   MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) SALES_SHIPMENT_QTY_VALUE,
    -- MISC ISSUE
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Inventory','Account' )
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Miscellaneous issue','Account issue')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) MISC_ISSUE_QTY,
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ('Inventory','Account' )
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Miscellaneous issue','Account issue')
    THEN
                   NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
                   MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) MISC_ISSUE_QTY_VALUE,
    -- Transfers
    SUM( CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ( 'Inventory' )
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Subinventory Transfer')
    THEN
                   --MMT.TRANSACTION_QUANTITY
                   mmt.primary_quantity
    ELSE 0
    END
    ELSE 0
    END ) TRANSFER_QTY,
    SUM( CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ( 'Inventory')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Subinventory Transfer')
    THEN      NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
                   MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
    ELSE 0
    END
    ELSE 0
    END ) TRANSFER_QTY_VALUE,
    -- Adjustment to Cost (Revaluation)
    SUM(CASE
         WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
    ( 'Standard cost update','Job or Schedule')
         THEN
              CASE
              WHEN MTT.TRANSACTION_TYPE_NAME in
    ('Standard cost update','WIP cost update')
    THEN
                   --2007JAN03:PKB MMT.TRANSACTION_COST
    MMT.TRANSACTION_COST* MMT.QUANTITY_ADJUSTED
    ELSE 0
    END
    ELSE 0
    END ) REVAL_VALUE
         FROM
         MTL_MATERIAL_TRANSACTIONS                MMT,
         --GL_PERIODS                          GP,
         MTL_TRANSACTION_TYPES                MTT,
         MTL_TXN_SOURCE_TYPES                    MTST,
    ORG_ORGANIZATION_DEFINITIONS                OOD
    WHERE     
    OOD.organization_code           = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
    AND OOD.inventory_enabled_flag = 'Y'
    AND OOD.operating_unit          = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
    AND OOD.SET_OF_BOOKS_ID          = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
    AND     MMT.ORGANIZATION_ID          = OOD.organization_id
    AND MMT.SUBINVENTORY_CODE          = NVL('&P_SUBINVENTORY_CODE', MMT.SUBINVENTORY_CODE)
    -- AND GP.PERIOD_SET_NAME          = 'HF-ACCTG-CAL' -- Hardcoded PKB
    AND
         (     (EXISTS
         ( select GP.Period_name
    FROM GL_PERIODS GP
    where TO_DATE(TO_CHAR(MMT.TRANSACTION_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
                   >= TO_DATE(TO_CHAR(GP.START_DATE,'DD-MM-YYYY'),'DD-MM-YYYY') --Between GP.START_DATE and GP.END_DATE
         AND GP.PERIOD_NAME      = '&P_GL_PERIOD_NAME_FROM'
              and GP.PERIOD_SET_NAME          = 'HF-ACCTG-CAL'
    AND NVL('&P_GL_PERIOD_NAME_FROM','ALL')      != 'ALL'
    OR (NVL('&P_GL_PERIOD_NAME_FROM' ,'ALL')               = 'ALL')
    AND
         (     (EXISTS
         ( select GP.Period_name
    FROM GL_PERIODS GP
    where TO_DATE(TO_CHAR(MMT.TRANSACTION_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
                   <= TO_DATE(TO_CHAR(GP.END_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
         AND GP.PERIOD_NAME      = '&P_GL_PERIOD_NAME_TO'
              and GP.PERIOD_SET_NAME          = 'HF-ACCTG-CAL'
    AND NVL('&P_GL_PERIOD_NAME_TO','ALL')      != 'ALL'
    OR (NVL('&P_GL_PERIOD_NAME_TO','ALL')               = 'ALL')
    AND MMT.TRANSACTION_TYPE_ID          = MTT.TRANSACTION_TYPE_ID
    AND MMT.TRANSACTION_SOURCE_TYPE_ID          = MTST.TRANSACTION_SOURCE_TYPE_ID
    group by
         MMT.ORGANIZATION_ID,
    MMT.INVENTORY_ITEM_ID,
    MMT.SUBINVENTORY_CODE
    )                    AGGREGATED_MTT,
    -- Inline Table for AVG_ITEM_COSTs 2nd time,
    (SELECT
         CIC.ORGANIZATION_ID     ORGANIZATION_ID,
    CIC.INVENTORY_ITEM_ID INVENTORY_ITEM_ID,
    CIC.COST_TYPE_ID COST_TYPE_ID,
    CCT.COST_TYPE     COST_TYPE,
    NVL(CIC.ITEM_COST ,0) ITEM_COST
    FROM
         CST_ITEM_COSTS           CIC,
         CST_COST_TYPES           ccT,
    ORG_ORGANIZATION_DEFINITIONS                OOD1
    WHERE
         CCT.COST_TYPE_ID           = CIC.COST_TYPE_ID
         /*AND (
         (CCT.COST_TYPE          = 'Average' and '&P_INV_ORG_CODE' = 'HS')
              OR
    (CCT.COST_TYPE          = 'Frozen' and '&P_INV_ORG_CODE' = 'HL')
    AND CCT.COST_TYPE_ID =
              ( select      m.primary_cost_method
              from      mtl_parameters m
    where      m.organization_id      = OOD1.ORGANIZATION_ID
         and OOD1.organization_code      = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
         AND OOD1.inventory_enabled_flag = 'Y'
         AND OOD1.operating_unit          = fnd_profile.value('ORG_ID') 83 --fnd_profile.value('ORG_ID')
         AND OOD1.SET_OF_BOOKS_ID     = fnd_profile.value('GL_SET_OF_BKS_ID') 1 --fnd_profile.value('GL_SET_OF_BKS_ID')
         AND cic.ORGANIZATION_ID          = OOD1.organization_id
         )                               AVG_ITEM_COST1
    WHERE
    AGGREGATED_MTT.ORGANIZATION_ID(+)          = All_Item_subinv.ORGANIZATION_ID
    AND AGGREGATED_MTT.INVENTORY_ITEM_ID(+) = All_Item_subinv.INVENTORY_ITEM_ID
    AND AGGREGATED_MTT.subinventory_code(+)     = All_Item_subinv.subinventory_code
    AND All_Item_subinv.ORGANIZATION_ID          = MSI.ORGANIZATION_ID
    AND ALL_Item_SUBInv.INVENTORY_ITEM_ID          = MSI.INVENTORY_ITEM_ID
    AND AVG_ITEM_COST1.ORGANIZATION_ID(+)     = MSI.ORGANIZATION_ID
    AND AVG_ITEM_COST1.INVENTORY_ITEM_ID(+)      = MSI.INVENTORY_ITEM_ID
    and msi.ROWID                         = MSIV.ROW_ID
    and msi.ORGANIZATION_ID                    = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
    and sysdate between NVL(msi.start_date_active,sysdate -1 )
    and NVL(msi.end_date_active,sysdate+1)
    Order BY
         MSI.SEGMENT1,
    MSI.DESCRIPTION     ,
    All_Item_subinv.SUBINVENTORY_CODE
    /

    Hi Barry and All: This indeed is a bug in SQLPLUS ! Version 9.2.0.1.0 as well.
    Thanks for asking the version no of SQLLPLUs. I was working thru Oracle Apps 11i.10 (concurrent program). So I did not get any message from SQLPLUS.
    I tested independently in SQLPLUS and got the message! Thanks Oracle!!!
    The Bug is in the name of COLUMN NAME or ALIAS Name. I renamed the columns from ON_HAND_QTY and ON_HAND_VALUE to CLOSE_QTY and CLOSE_QTY_VALUE. It worked!! The string 'ON' in the column/alias name is taken as 'ON' keyword/clause for 'compute' statement for SQLPLUS.
    Here is the message from SQLPLUS
    " SP2-0084: COMPUTE ON keyword specified already"
    See these two line and compare
    --compute SUM label 'Total $S: ' of SALARY ON_SALARY  on report;
    compute SUM label 'Total $S: ' of SALARY on report;
    Thanks - Pradip
    Here is the sample code to simulate. (not Big :))
    WHENEVER SQLERROR EXIT FAILURE
    CLEAR computes
    CLEAR BREAKS
    clear column
    TTITLE OFF
    BTITLE OFF
    set verify off
    set feedback off
    set echo off
    set heading off
    set termout off
    set linesize 203
    set pagesize 30
    set termout on
    SET UNDERLINE =
    set heading on
    COLUMN SALARY               FORMAT 9,999,990      Heading 'SALARY'           
    COLUMN ON_SALARY          format 9,999,990 Heading 'ON Salary'
    column ENAME format a20 heading 'NAME'
    COLUMN EMPNO Format 99999 HEADING 'EMPNO'
    BREAK on REPORT skip 3;
    --compute SUM label 'Total $S: ' of SALARY ON_SALARY  on report;
    compute SUM label 'Total $S: ' of SALARY on report;
    WHENEVER SQLERROR EXIT FAILURE
    select empno, ename, sal SALARY, sal ON_SALARY from scott.emp;

  • GPF in SQL*PLUS Copy Command?

    Hello,
    I'm getting a GPF and crash of SQL*Plus when I use the copy command. Seems like I used to be able to make it work if I tried logging on to the source database before the copy, but now even that won't work. I issue the command, it looks out over the modem for the remote database, then the GPF occurs.
    copy from me/[email protected] to me/me@LocalDB -
    insert ARRG_BNDRY_OBJECT -
    using -
    SELECT * FROM ARRG_BNDRY_OBJECT WHERE ARRG_BNDRY_KEY IN -
    (80169);
    Ideas?
    Thanks,
    Dale

    You might also want to try the same command using SQL*Plus command line (DOS version). If you haven't used it before, enter SQLPLUS at the command prompt, eg:
    c:\sqlplus
    Alison

  • SQL PLUS Copy Command

    I'm having problems with the copy command in sql plus
    Here's my command
    COPY FROM tib_oms/tib_oms@odb1 -
    TO gbonk/gbonk@stage -
    INSERT -
    gbonk.products ( id_manufacturer, id_sku, category ) -
    USING -
    select id_mfr, sku, prodcat from tib_oms.pricinghistory
    The error I receive is...
    CPY0007: Select list has fewer columns than destination table
    I'm selecting 3 columns and I'm specifing 3 columns so I don't get what's up.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Greg Bonk ([email protected]):
    Well i gave it a shot. Here's my modified copy command....
    copy from tib_oms/tib_oms@odb1 -
    TO gbonk/gbonk@stage -
    insert -
    gbonk.products ( "ID_MANUFACTURER", "ID_SKU", "CATEGORY" ) -
    using -
    select "ID_MFR", "SKU", "PRODCAT" from tib_oms.pricinghistory;
    But I still recieve the same error. Is there anything else that I could trouble shoot?<HR></BLOCKQUOTE>
    did u check if the destination & target columns have the same structure. maybe one of the is a composite datatype (i.e varray,nested tables etc) ?
    null

  • Copy function does not work

    HelloI have had the HP1510 since december this year. The copy function has never worked. When I press the copy button nothing happens. When I press colour and black and white it does print a test page.  The printer IS CONNECTED TO A WALL SOCKET. It has been cleaned and has new cartridges.  Can you help?

    Welcome to the HP Community , I saw your post about your Deskjet 1510 that is unable to produce copies, and wanted to reach out. I would suggest trying a power reset as your last resort to getting the copies to work. If a reset does not help, try another wall outlet. If the copies still do not work, chances are the scanner mechanism has failed internally. I'd then suggest contacting HP to inquire about a printer replacement, or trade in. I will include their contact details below for you. Turn the printer on.
    With the printer turned on, disconnect the power cord from the rear of the unit.
    Unplug the power cord from the wall outlet.
    Wait at least 15 seconds.
    Plug the power cord back into the wall outlet.
    Reconnect the power cord to the rear of the unit.
    If the printer does not turn on by itself, press the Power button to turn it on.   Step 1. Open link: www.hp.com/contacthp/
    Step 2. Enter Product number or select to auto detect
    Step 3. Scroll down to "Still need help? Complete the form to select your contact options"
    Step 4. Scroll down and click on: HP contact options - click on Get phone number
    Case number and phone number appear. Good luck to you!Click the thumbs up below if you wish to send me a "thanks" for my attempts to help you today!

Maybe you are looking for

  • Flex 10 error 0x80240031 when upgrade to 8.1

     I am facing this error code 0x80240031 while updating to 8.1 at 50%. I trying everything (download last windows update, command prompt and type/run: "sfc /scannow, Dism /Online /Cleanup-Image /RestoreHealth, change ISP and uninstall Antivirus). My l

  • How can I choose ringtones instead of pre-loaded sounds for alarms

    I have a bunch of questions. First, how can I choose ringtones (my last phone had a category called "tones") and other purchased sounds instead of the pre-loaded sounds for my alarms, text message alerts, etc.? Thanks.

  • Order of Deployment across Applications

    Is there any way I can set Weblogic to load certain applications first before the others are loaded. In my case, I have an Ear file "A" which is dependent on another EAR File "B" to be started first. ("A" has a MDB which sends stuff to B immediately

  • Dashboard gurus

    Guys, I have never before created a dashboard but have used WAD and very little VC. I will be using WAD or VC to setup dashboards in BI 7.0. Can a speed-o-meter or other graphs in dashboards can be double-clicked to drill down further. Please reply i

  • Problem moving pages within a pdf

    I have been working with a fairly large document (around 1500 pages) and it is impossible to re-order the pages.  An example: I will drag page 12 to page 2, and when I release the mouse button, the page will be at page 18.  Inserting from a file lead