Merge Into works in SQL, fails in PL/SQL

Database is 9i (Oracle9i Enterprise Edition Release 9.2.0.5.0)<br>
<br>
The 9i documentation--PL/SQL User's Guide and Reference
Release 2 (9.2)--makes it seem like this is part of the PL/SQL language, but the compiler disagrees.<br>
<br>
Anyone else encounter this?<br>
<br>
Test case:<br>
create table kev(d date, n number);<br><br>
Table created.<br>
<br>
..it works in SQL...<br>
MERGE INTO kev k<br>2 USING ( SELECT 1 n, sysdate d from dual ) s<br>
3 ON ( k.n = s.n )<br>
4 WHEN MATCHED THEN<br>
5 UPDATE<br>
6 SET k.d = s.d<br>
7 WHEN NOT MATCHED THEN<br>
8 INSERT (n,d)<br>
9 VALUES (s.n, s.d);<br>
<br>
1 row merged.<br>
<br>
..but not in PL/SQL...<br>
begin<br>2 MERGE INTO kev k<br>
3 USING ( SELECT 1 n, sysdate d from dual ) s<br>
4 ON ( k.n = s.n )<br>
5 WHEN MATCHED THEN<br>
6 UPDATE<br>
7 SET k.d = s.d<br>
8 WHEN NOT MATCHED THEN<br>
9 INSERT (n,d)<br>
10 VALUES (s.n, s.d);<br>
11 end;<br>
12 /<br>
MERGE INTO kev k<br>
*<br>
ERROR at line 2:<br>
ORA-06550: line 2, column 7:<br>
PLS-00103: Encountered the symbol "INTO" when expecting one of the following:
:= . ( @ % ; <a SQL statement><br>
<br>
Thanks.

Answer
There are indeed DB parameters conflicting with the MERGE statement. The DB I am working on is for Oracle Applications. Apparently, although the applications are certified to run on current databases, the underlying code base has not really been brought up, and users are forced into some backward compatibility constraints. So I am stuck until we get our application upgraded from 11.5.7 to something better.
Hope this helps someone else.
Kevin
From the database initialization parameters:
# Events
# Events should not be set unless directed by Oracle Support,
# or by instruction as per the Applications documentation.
# The following events should be set for PL/SQL backward
# compatibility.
# These events should only be used if you are using Oracle
# Applications release 11.5.7. For later releases (i.e. 11.5.8
# or higher), you should remove these events.
event="10932 trace name context level 32768"
event="10933 trace name context level 512"
event="10943 trace name context level 16384"

Similar Messages

  • "Merge into" statement doesn't work

    Hi Reader,
    It seems that in some of our installed machines merge into statement doesn't;t work. We've already experienced this issue on databases installed within virtual machines, but also found on other configurations sporadically.
    Using statement match a single/multiple records (according required logic)
    statement:
    MERGE INTO RNCATEGORIES CV
    USING dual ON
    ( CV.DESIGNCENTERID = in_DESIGNCENTERID
    AND CV.CADPACKAGENAME = in_CADPACKAGENAME
    WHEN MATCHED THEN
    UPDATE SET
    PKGCATEGORYID = in_PKGCATEGORYID,
         UserPackageType = in_UserPackageType
    WHEN NOT MATCHED THEN
    INSERT VALUES ( in_DESIGNCENTERID,
    in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
    Table script:
    CREATE TABLE RNCATEGORIES
    DESIGNCENTERID RAW(16) NOT NULL,
    CADPACKAGENAME NVARCHAR2(64) NOT NULL,
    PKGCATEGORYID RAW(16),
    USERPACKAGETYPE NVARCHAR2(64)
    PK_RNCATEGORIES PRIMARY KEY (DESIGNCENTERID, CADPACKAGENAME)
    Thanks in advance,
    Amir

    After creating the table, your merge statement gives me
    SQL> MERGE INTO RNCATEGORIES CV
      2  USING dual ON
      3  ( CV.DESIGNCENTERID = in_DESIGNCENTERID
      4  AND CV.CADPACKAGENAME = in_CADPACKAGENAME
      5  )
      6  WHEN MATCHED THEN
      7  UPDATE SET
      8  PKGCATEGORYID = in_PKGCATEGORYID,
      9  UserPackageType = in_UserPackageType
    10  WHEN NOT MATCHED THEN
    11  INSERT VALUES ( in_DESIGNCENTERID,
    12  in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
    AND CV.CADPACKAGENAME = in_CADPACKAGENAME
    ERROR at line 4:
    ORA-00904: "IN_CADPACKAGENAME": invalid identifierwhich is about what I expected. The USING clause requires a select statement, not just a table name. It looks to me like this merge statement is in some kind of stored procedure, and that the in_XXX are variables passed to that procedure. If this is correct, then your merge needs to be more like:
    MERGE INTO rncategories cv
    USING (SELECT in_designcenterid dcid, in_cadpackagename cpn,
                  in_pkgcategoryid pcid, in_userpackagetype upt
           FROM dual)
    ON (cv.designcenterid = dcid and
        cv.cadpackagename = cpn)
    WHEN MATCHED THEN
       UPDATE SET
       pkgcategoryid = pcid
       userpackagetype = upt
    WHEN NOT MATCHED THEN
       INSERT VALUES (dcid, cpn, pcid, upt);John

  • Patch 7303030  FAILED: file cst4274743.sql on worker  1 for product bom use

    Hello
    I'm a noob to the Oracle world, and are trying to update our system from 12.0.4 to 12.1.3 I got to the point of installing patch 7303030 and I keep get this FAILED: file cst4274743.sql on worker 1 for product bom username BOM. I have looked in the threads but have not found anything that has helped so far. I have tried restarting the worker but got the same result. can any one point me in some direct so i can complete my update in my test environment.
    Thanks

    Hello
    I'm a noob to the Oracle world, and are trying to update our system from 12.0.4 to 12.1.3 I got to the point of installing patch 7303030 and I keep get this FAILED: file cst4274743.sql on worker 1 for product bom username BOM. I have looked in the threads but have not found anything that has helped so far. I have tried restarting the worker but got the same result. can any one point me in some direct so i can complete my update in my test environment.
    Thanks

  • HELP!!! the session hang with a merge into sql statement

    This problem is due to merge into a bug caused it??
    i have a product run on 10.2.0.4 . OS is aix 5.3 .
    today i found the product running over 24,000 sec and the current sql have run 23,734.
    Anomaly the sql Should be a quick end but run so long time.
    the awrsql report sql plan is
    Execution Plan
    Id Operation Name Rows Bytes Cost (%CPU) Time
    0 MERGE STATEMENT 4 (100)
    1 MERGE TP_B_RB013_GL_MID
    2 VIEW
    3 NESTED LOOPS 1 4048 4 (50) 00:00:01
    4 TABLE ACCESS BY INDEX ROWID TP_B_RB013_GL_MID 1 3549 0 (0)
    5 INDEX RANGE SCAN IDX_GL_RB013_MID 1 0 (0)
    6 VIEW PUSHED PREDICATE 1 499 4 (50) 00:00:01
    7 WINDOW SORT PUSHED RANK 1 586 4 (50) 00:00:01
    8 HASH JOIN 1 586 3 (34) 00:00:01
    9 TABLE ACCESS BY INDEX ROWID GL_HIST_RB013 1 124 0 (0)
    10 INDEX SKIP SCAN IDX_GL_RB013 1 0 (0)
    11 TABLE ACCESS FULL GL_EVENT 1 462 2 (0) 00:00:01
    sql_fulltext
    MERGE INTO TP_B_RB013_GL_MID TP
    USING (SELECT TRAN_NO,
    B.EVENT_DEESC,
    ROW_NUMBER () OVER (PARTITION BY TRAN_NO ORDER BY B.EVENT_DESC) I
    FROM GL_HIST_RB013 A, GL_EVENT B
    WHERE EVENT_TYPE IS NOT NULL AND A.EVENT_TYPE = B.EVENT_ID AND B.SDATE = :B1
    ) RES
    ON ( RES.TRAN_NO = TP.BATCH_NO AND RES.I = 1 AND TP.REPORT_DATE = :B1 )
    WHEN MATCHED THEN
    UPDATE SET TP.EVENT_DESC = RES.EVENT_DESC
    Focus is the table "GL_EVENT" have 0 row,the sql should do nothing.
    This problem is due to merge into a bug caused it??
    last is awrsqlrpt Please note cputime and buffer gets
    WORKLOAD REPOSITORY SQL Report
    Snapshot Period Summary
    DB Name DB Id Instance Inst Num Release RAC Host
    FTLPRD 3272430330 FTLPRD 1 10.2.0.4.0 NO bj1finteldb0
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 5022 26-11?-11 21:00:35 127 12.1
    End Snap: 5030 27-11?-11 05:00:40 127 14.0
    Elapsed: 480.09 (mins)
    DB Time: 626.55 (mins)
    SQL Summary DB/Inst: FTLPRD/FTLPRD Snaps: 5022-5030
    Elapsed
    SQL Id Time (ms)
    a4j4qaqkvxr08 ##########
    MERGE INTO TP_B_RB013_GL_MID TP USING (SELECT TRAN_NO, B.EVENT_DESC, ROW_NUMBER
    () OVER (PARTITION BY TRAN_NO ORDER BY B.EVENT_DESC) I FROM GL_HIST_RB013 A, GL_
    EVENT B WHERE EVENT_TYPE IS NOT NULL AND A.EVENT_TYPE = B.EVENT_ID AND B.SDATE =
    :B1 ) RES ON ( RES.TRAN_NO = TP.BATCH_NO AND RES.I = 1 AND TP.REPORT_DATE = :B1
    SQL ID: a4j4qaqkvxr08 DB/Inst: FTLPRD/FTLPRD Snaps: 5022-5030
    -> 1st Capture and Last Capture Snap IDs
    refer to Snapshot IDs witin the snapshot range
    -> MERGE INTO TP_B_RB013_GL_MID TP USING (SELECT TRAN_NO, B.EVENT_DESC, R...
    Plan Hash Total Elapsed 1st Capture Last Capture
    # Value Time(ms) Executions Snap ID Snap ID
    1 3274057091 23,733,870 0 5024 5030
    Plan 1(PHV: 3274057091)
    Plan Statistics DB/Inst: FTLPRD/FTLPRD Snaps: 5022-5030
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
    into the Total Database Time multiplied by 100
    Stat Name Statement Per Execution % Snap
    Elapsed Time (ms) ########## N/A 63.1
    CPU Time (ms) 23,734 N/A 94.7
    Executions 0 N/A N/A
    Buffer Gets 371,326,923 N/A 84.8
    Disk Reads 16,740 N/A 0.2
    Parse Calls 1 N/A 0.0
    Rows 0 N/A N/A
    User I/O Wait Time (ms) 145,938 N/A N/A
    Cluster Wait Time (ms) 0 N/A N/A
    Application Wait Time (ms) 0 N/A N/A
    Concurrency Wait Time (ms) 2,348 N/A N/A
    Invalidations 0 N/A N/A
    Version Count 7 N/A N/A
    Sharable Mem(KB) 435 N/A N/A
    Execution Plan
    Id Operation Name Rows Bytes Cost (%CPU) Time
    0 MERGE STATEMENT 4 (100)
    1 MERGE TP_B_RB013_GL_MID
    2 VIEW
    3 NESTED LOOPS 1 4048 4 (50) 00:00:01
    4 TABLE ACCESS BY INDEX ROWID TP_B_RB013_GL_MID 1 3549 0 (0)
    5 INDEX RANGE SCAN IDX_GL_RB013_MID 1 0 (0)
    6 VIEW PUSHED PREDICATE 1 499 4 (50) 00:00:01
    7 WINDOW SORT PUSHED RANK 1 586 4 (50) 00:00:01
    8 HASH JOIN 1 586 3 (34) 00:00:01
    9 TABLE ACCESS BY INDEX ROWID GL_HIST_RB013 1 124 0 (0)
    10 INDEX SKIP SCAN IDX_GL_RB013 1 0 (0)
    11 TABLE ACCESS FULL GL_EVENT 1 462 2 (0) 00:00:01
    Full SQL Text
    SQL ID SQL Text
    a4j4qaqkvxr0 MERGE INTO TP_B_RB013_GL_MID TP USING (SELECT TRAN_NO, B.EVENT_DE
    ESC, ROW_NUMBER () OVER (PARTITION BY TRAN_NO ORDER BY B.EVENT_DE
    SC) I FROM GL_HIST_RB013 A, GL_EVENT B WHERE EVENT_TYPE IS NOT NU
    LL AND A.EVENT_TYPE = B.EVENT_ID AND B.SDATE = :B1 ) RES ON ( RES
    .TRAN_NO = TP.BATCH_NO AND RES.I = 1 AND TP.REPORT_DATE = :B1 ) W
    HEN MATCHED THEN UPDATE SET TP.EVENT_DESC = RES.EVENT_DESC

    Pl do not spam the forums with duplicate posts - HELP !!!  session pending or suspend beacause a merginto sql

  • Any idea why this MERGE INTO statment fails?

    I am using Oracle XE and trying to use a MERGE statment from an external table to a heap table.
    MERGE INTO
        ORDER_ITEM_INTELLI_LABS O
    USING
        ORDER_ITEM_INTELLI_LABS_STAGE S
        ON (O.ACC_NO = S."Acc No",
             O.DRAW_DATE = to_date(S."Draw Date",'MM/DD/RRRR'),       
            O.MED_REC_NO = S."Med Rec#",
            O.CODE_CPT = S."CPT",
            O.PROVIDER_ID = S."Provider ID",
            O.CLIENT_ID = S."Client ID")
      WHEN NOT MATCHED THEN
        INSERT
            (ORDER_ITEM_INTELLI_LABS_UID,
            DEPARTMENT_UID,
            DRAW_DATE,
            ACC_NO,
            MED_REC_NO,
            PATIENT_NAME,
            LAB_TEST_NAME,
            CODE_CPT,
            INS_CARRIER,
            PROVIDER_ID,
            CLIENT_ID,
            UPLOAD_DATE)
        VALUES
            (null,
            in_DEPARTMENT_UID,
            to_date(S."Draw Date",'MM/DD/RRRR'),
            S."Acc No",
            S."Med Rec#",
            S."Patient Name",
            S."Lab Test Name",
            S."CPT",
            S."Ins Carrier",
            S."Provider ID",
            S."Client ID",
            sysdate)
        where
            S."Draw Date" is NOT NULL;This is what I get:
      1  MERGE INTO
      2      ORDER_ITEM_INTELLI_LABS O
      3  USING
      4      ORDER_ITEM_INTELLI_LABS_STAGE S
      5      ON (O.ACC_NO = S."Acc No",
      6          O.DRAW_DATE = to_date(S."Draw Date",'MM/DD/RRRR'),
      7          O.MED_REC_NO = S."Med Rec#",
      8          O.CODE_CPT = S."CPT",
      9          O.PROVIDER_ID = S."Provider ID",
    10          O.CLIENT_ID = S."Client ID")
    11    WHEN NOT MATCHED THEN
    12      INSERT
    13          (ORDER_ITEM_INTELLI_LABS_UID,
    14          DEPARTMENT_UID,
    15          DRAW_DATE,
    16          ACC_NO,
    17          MED_REC_NO,
    18          PATIENT_NAME,
    19          LAB_TEST_NAME,
    20          CODE_CPT,
    21          INS_CARRIER,
    22          PROVIDER_ID,
    23          CLIENT_ID,
    24          UPLOAD_DATE)
    25      VALUES
    26          (null,
    27          in_DEPARTMENT_UID,
    28          to_date(S."Draw Date",'MM/DD/RRRR'),
    29          S."Acc No",
    30          S."Med Rec#",
    31          S."Patient Name",
    32          S."Lab Test Name",
    33          S."CPT",
    34          S."Ins Carrier",
    35          S."Provider ID",
    36          S."Client ID",
    37          sysdate)
    38      where
    39*         S."Draw Date" is NOT NULL
    SQL> /
        ON (O.ACC_NO = S."Acc No",
    ERROR at line 5:
    ORA-00907: missing right parenthesis
    SQL>

    This?
    MERGE INTO ORDER_ITEM_INTELLI_LABS O
      USING ORDER_ITEM_INTELLI_LABS_STAGE S
      ON (O.ACC_NO = S."Acc No"
          AND O.DRAW_DATE = TO_DATE (S."Draw Date", 'MM/DD/RRRR')
          AND O.MED_REC_NO = S."Med Rec#"
          AND O.CODE_CPT = S."CPT"
          AND O.PROVIDER_ID = S."Provider ID"
          AND O.CLIENT_ID = S."Client ID")
      WHEN NOT MATCHED THEN
        INSERT (ORDER_ITEM_INTELLI_LABS_UID, DEPARTMENT_UID, DRAW_DATE, ACC_NO, MED_REC_NO, PATIENT_NAME, LAB_TEST_NAME,
                CODE_CPT, INS_CARRIER, PROVIDER_ID, CLIENT_ID, UPLOAD_DATE)
        VALUES (NULL, in_DEPARTMENT_UID, TO_DATE (S."Draw Date", 'MM/DD/RRRR'), S."Acc No", S."Med Rec#", S."Patient Name",
                S."Lab Test Name", S."CPT", S."Ins Carrier", S."Provider ID", S."Client ID", SYSDATE)
          WHERE S."Draw Date" IS NOT NULL;

  • CS 3 worked yesterday - got software updates - now all parts merged into 1 uneditable image

    Hi. I worked on a logo yesterday. This a.m. I got software updates and did it automatically. I don't know what the updates were but I just did it and then the computer restarted. Now all my parts have been merged into one un-editable un-workable image. They are not separate any more. They are not grouped, not compounded, not locked. I do not know what happened. Any ideas? Thank you for any help you can give.

    Try again. I am having a lot of trouble w. the forum trying to get in with my correct user name and password. Too bad there isn't a way that I can delete the connection to my email and start from scratch. Anyway....
    Yes, I am working on the master page, no layers.
    I will try to run Disk Utility and reboot too.
    So far I have also done a page drag and saved it out as an inex.
    Thanks.

  • SSIS package is failing when using SQL server agent

    I am trying to execute an SSIS package through an SQL server agent and receiving the following error:
    Message
    Executed as user: serv-syst\SYSTEM. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 32-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  1:56:53 PM  Error: 2014-04-21
    13:56:54.81     Code: 0xC0202009     Source: PACKAGEWMG Connection manager "DestinationConnectionOLEDB"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred.
    Error code: 0x80040E4D.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'hsnzha'.".  End Error  Error: 2014-04-21
    13:56:54.82     Code: 0xC00291EC     Source: Drop table(s) SQL Task 1 Execute SQL Task     Description: Failed to acquire connection "DestinationConnectionOLEDB". Connection may not be configured
    correctly or you may not have the right permissions on this connection.  End Error  Error: 2014-04-21 13:56:54.82     Code: 0xC0202009     Source: PACKAGEWMG Connection manager "DestinationConnectionOLEDB"    
    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E4D  Description: "Login
    failed for user 'hsnzha'.".  End Error  Error: 2014-04-21 13:56:54.82     Code: 0xC00291EC     Source: Preparation SQL Task 1 Execute SQL Task     Description: Failed to acquire connection
    "DestinationConnectionOLEDB". Connection may not be configured correctly or you may not have the right permissions on this connection.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  1:56:53 PM 
    Finished: 1:56:54 PM  Elapsed:  0.844 seconds.  The package execution failed.  The step failed.
    My SSIS package retrieves a excel file and saves the vales into an SQL table. When I run the package by itself in my server it works fine but when it's called from a SQL agent, it fails with the above error. Please help me resolve it.

    That's the issue. If it's a SQL login the password cannot be retrieved by account executing the package from the job which is why login fails. In that case best thing would be set password in job properties or pass it using configuration created in the package
    See
     HTTP://blogs.msdn.com/b/runeetv/archive/2011/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    My package is saved with ServerStorage which appears under \\server\Stored Packages\MSDB\PACKAGE and when I run it, it works fine.
    There is a new error message that I get now after following the steps from the link...
    Message
    Microsoft (R) SQL Server Execute Package Utility
    Version 10.50.1600.1 for 32-bit
    Copyright (C) Microsoft Corporation 2010. All rights reserved.
    Started:  3:34:22 PM
    Error: 2014-04-21 15:34:23.82
       Code: 0xC0202009
       Source: PACKAGEWMG Connection manager "SourceConnectionExcel"
       Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "Unexpected error from external database driver (????????).".
    End Error
    Error: 2014-04-21 15:34:23.82
       Code: 0xC020801C
       Source: Data Flow Task 1 Source - 'Contact Center$' [1]
       Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "SourceConnectionExcel" failed with error code 0xC0202009.  There may be error
    messages posted before this with more information on why the AcquireConnection method call failed.
    End Error
    Error: 2014-04-21 15:34:23.82
       Code: 0xC0047017
       Source: Data Flow Task 1 SSIS.Pipeline
       Description: component "Source - 'Contact Center$'" (1) failed validation and returned error code 0xC020801C.
    End Error
    Error: 2014-04-21 15:34:23.82
       Code: 0xC004700C
       Source: Data Flow Task 1 SSIS.Pipeline
       Description: One or more component failed validation.
    End Error
    Error: 2014-04-21 15:34:23.82
       Code: 0xC0024107
       Source: Data Flow Task 1
       Description: There were errors during task validation.
    End Error
    DTExec: The package execution returned DTSER_FAILURE (1).
    Started:  3:34:22 PM
    Finished: 3:34:23 PM
    Elapsed:  1.25 seconds

  • FORALL MERGE statement works in local database but not over database link

    Given "list", a collection of NUMBER's, the following FORALL ... MERGE statement should copy the appropriate data if the record specified by the list exists on both databases.
    forall i in 1..list.count
    merge into tbl@remote t
    using (select * from tbl
    where id = list(i)) s
    on (s.id = t.id)
    when matched then
    update set
    t.status = s.status
    when not matched then
    insert (id, status)
    values (s.id, s.status);
    But this does not work. No exceptions, but target table's record is unchanged and "sql%rowcount" is 0.
    If the target table is in the local database, the exact same statement works:
    forall i in 1..list.count
    merge into tbl2 t
    using (select * from tbl
    where id = list(i)) s
    on (s.id = t.id)
    when matched then
    update set
    t.status = s.status
    when not matched then
    insert (id, status)
    values (s.id, s.status);
    Does anyone have a clue why this may be a problem?
    Both databases are on Oracle 10g.
    Edited by: user652538 on 2009. 6. 12 오전 11:29
    Edited by: user652538 on 2009. 6. 12 오전 11:31
    Edited by: user652538 on 2009. 6. 12 오전 11:45

    Should throw an error in my opinion. The underlying reason for not working is basically because of
    SQL> merge into   t@remote t1
         using   (    select   sys.odcinumberlist (1) from dual) t2
            on   (1 = 1)
    when matched
    then
       update set i = 1
    Error at line 4
    ORA-22804: remote operations not permitted on object tables or user-defined type columnsSame reason as e.g.
    insert into t@remote select * from table(sys.odcinumberlist(1,2,3))doesn't work.

  • Lightroom link to PS Panorama merge Not working with Photoshop CC 2014 upgrade

    I recently received an upgrade to PS CC to PS CC2014. After Upgrading I now notice the Option in Lightroom 5.5 to edit in PS and merge to Panorama is no longer working.
    When used, PS program starts, but does not con tune with the script to load existing files and merge into a panorama image.
    Does PS CC 2014 use a different script? as it seems to be failing.
    Has anyone else had this issue, is there a fix coming?

    This worked for me, and a simple solution...
    Start PS - restart LR :-)

  • Maintain Multi-Lingual Tables Option Fails On Cznlins.Sql

    Hi all.
    I am trying to install Albanian language in a 11.5.10.2 fresh installation.
    I applyed all the neccesary patches to come to the NLS apply patch stage.
    I followed the link
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=316804.1
    for applyeing NLS Patch. I have to run the AD Utility Maintain Multi-Lingual Tables ,before applying NLS.
    But the workers fail on Cznlins.Sql.
    The worker's log shows:
    Start time for file is: Wed Jun 18 2008 14:13:08
    sqlplus -s APPS/***** @/oracle/prodappl/cz/11.5.0/sql/CZNLINS.sql
    PL/SQL procedure successfully completed.
    MESG
    LANGUAGE = AMERICAN
    PACKAGE= CZ_LOCALIZED_TEXTS_PKG
    SQLERRM= ORA-01400: cannot insert NULL into ("CZ"."CZ_LOCALIZED_TEXTS"."CREATED_
    BY")
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Time when worker failed: Wed Jun 18 2008 14:13:08
    My question are:
    1.) Has anyone encountered this problem before.On the specific Cznlins.Sql file?
    2.) Shall i skip Maintain Multi-Lingual Tables, install the NLS, and run Maintain Multi-Lingual Tables after the installation?Do you recommend me to do this?
    Thanks in advance, Soni

    Hi hsawwan
    i am sending you the Road Map of patches i have applied,in my OEL 4 server enviroment.
    1.     Apply patch 4320012
    2.     Apply patch 6502082
    3.     Apply patch 6323691
    4.     Apply patch 6831988
    5.     Apply patch 4948577
    6.     Apply patch 5713544
    7.     Apply patch 4261542
    8.     Apply patch 5216496
    9.     Apply patch 5753922
    10.     Apply patch 6195759
    11.     Apply patch 5938515
    12.     Apply patch 3830807
    13.     Apply patch 4586086
    14.     Apply patch 4888294
    15.     Apply patch 5989593
    16.     Apply patch 3218526
    17.     Apply patch 3761838
    18.     Apply patch 4206794
    19.     Apply patch 5903765
    20.     Apply patch 3865683
    21.     Apply patch 4619025
    22.     Apply patch 6372396
    23.     Apply patch 4653225
    24.     Installation of Oracle 10g R2 database,software only(different home).
    25.     Installation of Oracle 10g R2 companion cd products.
    26.     Installation of Oracle 10g R2 pachset2
    27.     Apply patch 5257698
    28.     Upgrading to Oracle 10g R2
    29.     Configuring AutoConfig on db tier
    30.     Apply patch 5753621
    31.     Prepare for NLS(failed on AD Maintain Multi-Lingual Tables on CZNLINS.sql file)
    Is this the right way, before applying NLS, for albanian language?
    Do you think i have any conflicts in my list of patches?
    Thanks, Soni

  • TSQL working in 2008 but not in SQL Server 2014

    Hello,
    We recently have been asked to move from SQL Server 2008 to SQL Server 2014. We are trying to run parallel tests and one of our queries that was working perfectly in 2008 is not working in 2014.
    One of the filter on the our query(from 2008) is we convert a varchar field to date and compare it to anotehr calulated filed ("convert(date,Quick_Data_Start_Date) <= convert(date,(Year_ID_to_Use + '-' + Month_ID_to_Use + '-01'))").
    This worked fine in 2008 but when i try to do similar operation in 2014 it returns no result.
    For testing purposes, instead of converting the field to date format, i manully converted the actual value i.e. instead of using "convert(date,Quick_Data_Start_Date)" when i use "convert(date,'8/1/2014')" the code works fine.
    The field "Quick_Data_Start_Date" comes from a pivot query.
    When i create a temporary table for the pivot query and use the temporary table in  my code and then convert the field on fly the code works fine again.
    Seems like the T sql is not able to convert the field from varchar to date on the fly when coming from a different query. We have tried changing the compatbility level to 100 as well and it still would not work.
    Any suggestions and comments will be really helpful. Thanks.
    Regards,
    GM

    Hello, here is my overall review:
    The query is not optimized … agreed!  But that’s not the issue.
    There are a number of indexes that could be created, a number of minor calculations or evaluation criteria that could be improved to make the query more efficient … again – AGREED.
    The query “as is” runs in just under a minute (on SQL 2008 machine with less memory and slower hard drives).  Adding the indexes would take more time to add than they would save.
    NONE of that should make the query NOT WORK.  These deficiencies might make it run more slowly, but should not cause the query to return no results.
    “order by” shouldn’t make any difference because the query plan isn’t assuming or using any special order
    The main table (~10 M rows) is using a clustered index scan (not efficient, but not the point)
    The Time dimension table is using a non-clustered index seek (so the index is sorted but the data in the table is NOT physically sorted that way)
    The pivot subquery is using clustered index scan (it’s only 6 rows, so who cares)
    Once again, the order by might make it less efficient, but shouldn’t make it fail.  We get no errors or warnings – it just returns no rows.
    Because the query DOES return results when we 
    Either dump the Pivot query result into a #temp table(single row) and use the #temp table instead of the pivot query in the big SQL or  
    The “input” tables are limited to X rows but DOES NOT when the inputs have more rows
            This strongly suggests a memory issue.
    The server has 64 GB of RAM, but this probably isn’t enough to hold millions of rows and calculations.
    Can we turn on some traces to see what’s happening to the data in the query?  How and what are we looking for?
    Once the memory capacity is exceeded, SQL should be pushing these results to a temporary table (either in the local database or the tempdb).  Can we test to see if that is happening? 
    How?
    Is there a permissions issue?
    I have successfully done large copies outside of SQL (copied 300+ GB file from one location to another) that had to use the disk instead of just memory … means the disk write operation
    isn’t restricted from my user account.
    I can also confirm that the account that runs the SQL Service (“Network Service” account) has full permissions to the drives and paths where the mdf and ldf files are stored (including
    master and temp).
    If this doesn’t work, our upgrade is basically frozen and cannot proceed.  I’m really out of ideas … anything?

  • Report failed to parse SQL query:ORA-01745: invalid host/bind variable name

    Hi,
    We are currently upgrading from v2.2.0.00.32 to v4.0.0.00.46.
    I have copied the applications onto our test server along with the various database objects and data etc.
    When I am running a report in v4, it is failing with the following error: "failed to parse SQL query: ORA-01745: invalid host/bind variable name".
    When I copy the SQL that builds the report into TOAD (on out test server) it runs OK so really cant see why it would fail in APEX. It works fine when I run the query in our APEX v2 and in TOAD in our live server.
    The query is as follows:
    SELECT
    aea.ALTERATION_ID
    ,aea.ALTERATION_ID "ALTERATION_ID_DISPLAY"
    ,aea.assembly_name "Revised BOM"
    ,assembly.description "Revised BOM Description"
    ,assembly.INVENTORY_ITEM_STATUS_CODE "Revised BOM Status"
    ,aea.BEFORE_CHANGE_QTY
    ,flv.MEANING "Alteration Type"
    ,aea.component_name "Part No"
    ,component.description "Part No Description"
    ,component.INVENTORY_ITEM_STATUS_CODE "Part No Status"
    ,aea.AFTER_CHANGE_QTY
    ,TO_CHAR(aea.last_update_date,'DD-MM-YYYY HH24:MI:SS')"Last Update Date"
    ,aea.LAST_UPDATE_BY
    ,aea.COMMENTS
    ,aea.ORACLE_CHANGE_NOTICE
    ,AEA.SELECTION_CRITERIA
    FROM XXMEL_APEX_ECO_ALTERATIONS aea
    , fnd_lookup_values flv
    , (SELECT INVENTORY_ITEM_STATUS_CODE
    ,segment1
    ,description
    FROM mtl_system_items_b
    WHERE 1=1
    AND organization_id = 26) component
    , (SELECT INVENTORY_ITEM_STATUS_CODE
    ,segment1
    ,description
    FROM mtl_system_items_b
    WHERE 1=1
    AND organization_id = 26) assembly
    WHERE 1=1
    AND aea.COMPONENT_NAME = component.segment1 (+)
    AND aea.assembly_NAME = assembly.segment1 (+)
    AND flv.lookup_code = aea.acd_type
    AND aea.eco = :P13_ECO
    AND flv.lookup_type = 'ECG_ACTION'
    AND modify_flag = 'Y'
    ANy help would be great,
    Thanks
    Chris
    Edited by: Cashy on 22-Nov-2010 04:13
    Edited by: Cashy on 22-Nov-2010 04:14

    For some reason, the updatable fields (this is a updateable report) where not connecting to the database properly. Whn I changed them to a report columns and removed the database field reference, the report rendered

  • Primary key failure with merge into...should not happen

    I get primary key constraint fail on this MERGE INTO sql.
    Why? Shouldn't the merge into take care of this?
    ORA-00001: unique constraint (NCSL.SYS_C001568) violated
    MERGE INTO SessionTbl2 thistbl
    USING
      (SELECT 'b2cdd2f30b786c329ad2f8d04d0e79e9' sessionid FROM dual) thistbl2
      ON (thistbl2.sessionid = thistbl.sessionid AND thistbl.varname=:varname)
    WHEN MATCHED THEN
      UPDATE SET thistbl.varvalue=:variablevalue,
      thistbl.only_on_page=:onlyonpage,
      thistbl.expire_tstamp=:expire_tstamp,
      thistbl.inactivity_timeout=:inactivity_timeout,
      thistbl.readonly=:readonly
    WHEN NOT MATCHED THEN
      INSERT (sessionid,varname,varvalue,tstamp,
      only_on_page,expire_tstamp,inactivity_timeout,
      readonly)          
      VALUES
      (:cacheidval,:varname,:variablevalue,:nowts,
      :onlyonpage,:expire_tstamp,:inactivity_timeout,
      :readonly)

    As you say, this should not give a problem then, but the only way to be sure the system is doing what you believe it should do is to use the same variables in the test and in the insert statement. The bind variable depends on the programming language you use and may pass something else than the string that oracle generates in the select from dual. I do not say it will be as such, I just want to make sure that this is not the problem. I have seen things like this before and you keep on looking in the wrong direction for a solution.
    Peter

  • Execute immediate 'alter session set current_schema = ' failed in PL/SQL

    Hi
    I am trying to run
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    in a pl/sql block but it is failing.Can anyone update me on this.
    CREATE OR REPLACE PROCEDURE test3
    IS
    A_COUNT NUMBER(15);
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    SELECT COUNT(*) INTO A_COUNT FROM (
    select id from solutions );
    END;
    /

    The user who owns the procedure needs to be granted direct select rights on table test.solutions (not via a role). Still will not help. Look what OP is trying to do. In a stored procedure owned by some user (other than TEST) OP is trying to reference user TEST owned table solution without prefixing it with owner. Something like:
    SQL> create table u1.test_tbl(x number);
    Table created.
    SQL> select * from test_tbl;
    select * from test_tbl
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> alter session set current_schema = U1;
    Session altered.
    SQL> select * from test_tbl;
    no rows selected
    SQL> However, OP tries to do it in a SP using dynamic SQL to change current schema to test. Such change will occur when SP will be executed, not when is it compiled. At compile time we are still under SP owner's schema and therefore select from solutions implies table solutions owned by SP owner, not by TEST. The only way to make SP compile and work OK is to select from solutions also dynamically:
    SQL> select sys_context('userenv','current_schema') from dual
      2  /
    SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
    SCOTT
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  BEGIN
      5  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      6  SELECT COUNT(*) INTO A_COUNT FROM (
      7  select x from test_tbl );
      8  END;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE TEST3:
    LINE/COL ERROR
    6/1      PL/SQL: SQL Statement ignored
    7/15     PL/SQL: ORA-00942: table or view does not exist
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  c sys_refcursor;
      5  BEGIN
      6  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      7  OPEN C FOR 'SELECT COUNT(*) FROM (select x from test_tbl )';
      8  FETCH c INTO A_COUNT;
      9  dbms_output.put_line(a_count);
    10  CLOSE c;
    11  END;
    12  /
    Procedure created.
    SQL> insert into u1.test_tbl select rownum from emp;
    14 rows created.
    SQL> exec test3
    14
    PL/SQL procedure successfully completed.
    SQL> Obviously, as you noted SP owner must have directly granted select on test3.solutions.
    SY.

  • MERGE INTO

    Hi All,
    i need an expert advice in this matter, and if possible please explain with some code/example.Here is the situation.
    This process will read all records in the STAGING_TABLE and process the data into the MY_DATABASE tables.
    STG_ID will be used to populate the MY_ID with in MY_DATABASE.
    Any records that fail the load process will be flagged as 'error' by populating the ERROR_TABLE with the reson for the failure. After the load has been performed, all error records will be corrcted and reloaded.
    outline as below:
    1. Read all staging table records.
    2. Use the STG_ID value to determine whether the record already exists with in the MY_DATABASE tables.
    3. If not exist, create the one with associated records.
    4. If exists, compare the staging data to the MY_DATABASE data as per the rules. Then update the appropriate data in MY_DATABASE.
    5. If any records are invalid, update the staging table record with the error message.
    6. create a record in MY_LOGS table to indicate successfull completion of the process as well as the number of records processed.
    Now my approach is to use MERGE INTO path. I know that we can do it with the help of PL/SQL. given the above scenerio which approach is the better one. we have millions of records to be processed. Do merge has the capability to take care of all the logics i.e(insert/update/logs/bad-records)
    can we use Merge in procedure and packages ?
    please give me some advise in this matter .
    Thanks!

    read the following , you might get a better idea
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_915a.htm#SQLRF01606
    Have you considered using External Tables ?

Maybe you are looking for