Flashback table does not work in 10.2?

I thought that you can undo a drop and recover any table with FLASHBACK TABLE feature which comes with 10.2 by default (i.e. not special setting up is required). But I get this error when I try to do it.
ORA-00439: feature not enabled: Flashback Table
I used FLASHBACK TABLE <table name> BEFORE DROP;

Ahmer Mansoor wrote:
Dear Channa,
Please make sure that the parameter recyclebin is on, if not then do the following.
SQL> ALTER SYSTEM SET RECYCLEBIN=ON SCOPE=BOTH;
Well, you must check before posting a statement that whether its working or not. Your reply is actually wrong in every manner. First, the parameter is a static parameter and can't be changed by the option BOTH. It has to be spfile and will be requiring a restart of the db. Please see below,
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system set recyclebin=off;
alter system set recyclebin=off
ERROR at line 1:
ORA-02096: specified initialization parameter is not modifiable with this
option
SQL> alter system set recyclebin=off scope=both;
alter system set recyclebin=off scope=both
ERROR at line 1:
ORA-02096: specified initialization parameter is not modifiable with this
option
SQL> alter system set recyclebin=off scope=spfile;
System altered.
SQL> startup force
ORACLE instance started.
Total System Global Area  263639040 bytes
Fixed Size                  1373964 bytes
Variable Size             205523188 bytes
Database Buffers           50331648 bytes
Redo Buffers                6410240 bytes
Database mounted.
Database opened.
SQL> show parameter recyclebin
NAME                                 TYPE        VALUE
recyclebin                           string      OFF
SQL>Second, there is no relation between the parameter's value being OFF/On and the message that the OP is receiving. If the parameter is set to OFF, this would be the message,
SQL> conn aman/aman
Connected.
SQL> create table test_tab(a number);
Table created.
SQL> drop table test_tab;
Table dropped.
SQL> flashback table test_tab to before drop;
flashback table test_tab to before drop
ERROR at line 1:
ORA-38305: object not in RECYCLE BIN
SQL> show parameter recyclebin
NAME                                 TYPE        VALUE
recyclebin                           string      OFF
SQL> select * from V$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL>HTH
Aman....

Similar Messages

  • Early Adopter release : Extract DDL for tables does not work

    Hi,
    just had a look at Raptor - really nice tool - easy install - could be a replacement for SQLnavigator for us. One or two things I noticed though ...
    1)
    Export->DDL for tables does not work throws following error
    java.lang.ClassNotFoundException: oracle.dbtools.raptor.dialogs.actions.TableDMLExport
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at oracle.ideimpl.IdeClassLoader.loadClass(IdeClassLoader.java:140)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at oracle.dbtools.raptor.dialogs.BasicObjectModifier.launch(BasicObjectModifier.java:142)
         at oracle.dbtools.raptor.dialogs.BasicObjectModifier.handleEvent(BasicObjectModifier.java:210)
         at oracle.dbtools.raptor.dialogs.actions.XMLBasedObjectAction$DefaultController.handleEvent(XMLBasedObjectAction.java:265)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:530)
         at oracle.ide.controller.IdeAction$1.run(IdeAction.java:785)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:804)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:499)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    and 2)
    when I click on a package body - I get "loading ..." below it but it never puts the
    procedure names in and the "loading ..."message stays in the tree view - however you do get to see the packages in the source window.
    Realise this is very much a work in progress and am grateful to see an early release such as this. Looking forward to the production release.
    Best regards,
    David.

    OK thanks for looking ....you've obviously got the fixes on your to do lists
    Noticed that the SQL tab when you select an object works fine - displays the
    DDL for the object
    Do you think you'll have functionality so you can select many objects (shift left click) and
    then create a DDL script for them? It looks like you can do this for all objects in a schema but
    the ability to select a subset of objects in a schema would be very useful for our DBA's.
    Couldn't see any good reason for keeping using SQLNavigator
    Many congratulations on producing such a useful tool.
    Kind regards,
    David.

  • Select All in a table does not work for Drag and Drop

    Hi. I am using Jdeveloper 11.1.1.2 but have also reproduced in 11.1.1.3.
    I am trying to implement drag and drop rows from one table to another. Everything works fine except when I do a Select All (ctrl-A) in a table, the table visually looks like all rows are selected, but when I try to click on one of the selected rows to drag to the other table, only the row I click on is dragged.
    I tried setting Range Size -1, fetch mode to FETCH_ALL, content delivery to "immediate" but nothing works.
    I even have reproduced not using a view object but just a List of beans with only 5 or 10 beans showing in the table.
    Does anyone know how to get Select All to work for a Drag Source?
    Thanks.
    -Ed

    Frank-
    OK, thanks for looking into that. I also submitted this service request, which includes a simple sample app to demonstrate the problem:
    SR #3-2387481211: ADF Drag and Drop does not work for rows in table using Select All
    Thanks again for the reply.
    -Ed

  • Flashback Reclaimable Does Not Work Properly

    We saw the strange behavior of flashback reclaimable space as it does not work properly if the PERCENT_SPACE_USED of v$flash_recovery_area_usage is near to 100 (99.9x). As we are running Oracle 10gR2 (Cluster & RAC) to manage our production RAC database, it is a two node RAC. on IBM AIX 6.1
    Today at 9:00 AM, we observed that 97% reclaimable space was available. And db_recovery_file_dest_size is 460 GB out of 600 GB (mount point). No other process is being used this mount point for any IO, it is reserved for flashback only. We left 140 GB space free on mount point to over come any dynamic space requirement for flashback.
    At 10:00AM we received out of space message in alert log file and during 9:00 AM to 10:00 AM 10 to 15 archive logs were created and at 9:50AM some archive log were also deleted automatically by oracle server(default behavior). Please see the output below.
    FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
    CONTROLFILE 0 0 0
    ONLINELOG 0 0 0
    ARCHIVELOG 99.9 98 1520
    BACKUPPIECE 0 0 0
    IMAGECOPY 0 0 0
    FLASHBACKLOG 0 0 0
    It is really a strange behavior, please is there any one who face the same issue or what may be the reason for this ?
    regards,
    Edited by: user13656883 on Jul 18, 2011 11:27 PM

    Dear CKPT,
    we daily have 3 times archive log backup and after every backup we do crosscheck. as is mentioned earlier, 99% space was shown as used and but on the other hand 97% space was also shown as reclaimable. so on these bases we are very confused , why oracle behaves like this and throw error in alert log as below
    ORACLE Instance rac1 - Archival Error
    Mon Jul 18 09:59:08 2011
    ORA-16014: log 1 sequence# 39143 not archived, no available destinations
    ORA-00312: online log 1 thread 1: '/u02/oradata/rac/redo01.log'
    Mon Jul 18 09:59:08 2011
    Errors in file /u01/oracle/product/1020/db/admin/rac/bdump/rac1_arc0_3212156.trc:
    ORA-16014: log 1 sequence# 39143 not archived, no available destinations
    ORA-00312: online log 1 thread 1: '/u02/oradata/rac/redo01.log'
    Mon Jul 18 10:04:13 2011
    Errors in file /u01/oracle/product/1020/db/admin/rac/bdump/rac1_arc1_3277694.trc:
    ORA-19815: WARNING: db_recovery_file_dest_size of 493921239040 bytes is 100.00% used, and has 0 remaining bytes available.
    Mon Jul 18 10:04:13 2011
    regards,

  • DB Toolbox List tables - does not work properly

    Hello All
    I have two databases: one "c:\a\aa.mdb" contains some tables inside
    second "c:\a\bb.mdb" contains no table.
    When I run the list tables command from DB toolbox SEPARATELLY the tables are listed in proper way, i.e. one has tables, second does not.
    But when I build a vi which returns the table list, and call it twice the result is wrong. Both database seems to have all tables, even though the second does not contain any tables.
    I attachment you will find the packed example.
    Two databases with udl files (change if unpacked to different directory than c:\a\).
    The vi "two vi tables.vi" shows the problem. It calls "find tables.vi" to return the tables in database.
    You can see th
    at when DB List tables is called in the main vi it works fine. But when it is called two times inside the loop it returns false results.
    Can anybody comment on this.
    For those who are afraid of unpacking zip files I enclose pictures.
    thank you in advance
    Pawel
    Attachments:
    list_tables.zip ‏36 KB
    diagram.gif ‏22 KB
    front_pannel.gif ‏37 KB

    Pawel,
    I apologize for the delayed response to your first question. I am currently working on the problem in order to determine a more permanent solution. These forums are a very important resource for not only helping our customers but also for improving our products!
    With regards to your other question I believe the problem is one of data flow programming. Each table creation will take a certain amount of time to complete depending on the size and nature of the rows and columns being inserted. Unless you programmatically control the data flow, the �DB Tools Execute Query.vi� does not necessarily know when each table has been created. Since control is handed off to the database program, the �DB Tools Create Table vi� is forced to wait
    until the database program returns control.
    To programmatically control the flow of data you would need to use either a case structure with a while loop (suggested) or a sequence structure. These structures are critical in cases where execution of a previous section of code must be completed before subsequent code portions are to execute. I have attached an exaple that may prove useful.
    The wait method is actually a good way to time data flow but in this case may not be the best solution if you want your table creations to be dynamic over time (you may be forced to change the wait for larger table creations, for instance). If you know that your table creations will never change then using a wait method may be an acceptable solution.
    I hope this information helps out some. If not please post back with some sample code or more detail on your issue. Good Luck!
    Craig H.
    National Instruments
    Attachments:
    Create_Table_Example.zip ‏26 KB

  • TRUNCATE TABLE does not work in PL/SQL - Why?

    Hey there!
    Is there any issue with truncate table not working inside an PL/SQL package?
    For example this function:
    PROCEDURE FLUSH_TABLE(vi_table_name VARCHAR2) IS
    vn_table_name VARCHAR2(30);
    BEGIN
    vn_table_name := UPPER(LTRIM(RTRIM(vi_table_name)));
    TRUNCATE TABLE vn_table_name;
    END FLUSH_TABLE;
    returns the following error msg:
    Error: PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    Line: 5926
    Text: TRUNCATE TABLE VN_TABLE_NAME;
    Can somebody explain me the problem here? In my point of view, the error msg is not quite right ;)
    Regards,
    Thomas

    > I just think the error msg is confusing
    When you looked for TRUNCATE in the PL/SQL reference you might have noticed that the PL/SQL language has no TRUNCATE keyword. The error message indicates that syntactically the code appears to be some sort of variable assignment but has an extra keyword and no assignment operator. You would get the same message for any similar string of unrecognised keywords:
    SQL> BEGIN
      2      TRUNCATE TABLE emp;
      3  END;
      4  /
        TRUNCATE TABLE emp;
    ERROR at line 2:
    ORA-06550: line 2, column 14:
    PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    SQL> BEGIN
      2      TRANSMOGRIFY TABLE emp;
      3  END;
      4  /
        TRANSMOGRIFY TABLE emp;
    ERROR at line 2:
    ORA-06550: line 2, column 18:
    PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    SQL> BEGIN
      2      MORE TEA VICAR; 
      3  END;
      4  /
        MORE TEA VICAR;
    ERROR at line 2:
    ORA-06550: line 2, column 10:
    PLS-00103: Encountered the symbol "TEA" when expecting one of the following:
    := . ( @ % ;

  • ADF 12.1.2 - filtering in table does not work (not visible)

    Hi.
    When using ADF 12.1.2, in a RichTable based on a View Object which, in turn, is based on an SQL Query, table column filter is not being displayed. However, if View Object is based on an Entity Object, table column filter works just fine.
    Vadim.

    Again to back up what Timo says here, it's important you understand that Oracle Support is your primary mechanism for getting fixes out of Oracle.  It is a contract between your organization and Oracle to provide support.  These OTN forums have no SLA attached, and indeed are frequented by Oracle employees on a voluntary capacity (we like to help customers).  If you absolutely need a fix, you should go through Support.
    I know at this point some people like to get up on their soapbox and tell Oracle "how it should be", but that's ignoring the pragmatic reality, Support is the mechanism which Oracle has in place for you to get results to bug, fixes and other assistance.
    I hope I've been clear enough here gang.
    CM.

  • .click on row works with php table - does not work with javascript table.

    Howdy,
    I've run into a very interesting problem today, and I hope you'll be able to help me.
    I have a page in which the top is php to read a table from the server, and post the table as the html page is being built.
    The data come up as a table, and each row is clickable, that click moving the user to a different page, based on the row clicked.
    Here are the relevant parts of the php code:
    <?php
    echo "<table id='patienttable' cellpadding=5px border=0 font-size=16px>";
    echo "<tr><th width='30'>"."ID#"."</th><th width='100'>"."Last Name"."</th><th width='100'>"."First Name"."</th><th width='100'>".
    "Middle Name"."</th><th width='80'>"."DOB"."</th><th width='50'>"."Zip"."</th><th width='50'>"."Gender"."</th><th width='100'>".
    "Phone"."</th></tr>";
    while ($row = mysqli_fetch_array($result))
    blah blah blah
    echo "<tr><td id='localid'>".$localid. "</td><td>".$lastname. "</td><td>".$firstname. "</td><td>".$middlename."</td><td>".$dob."</td><td>".$physzip. "</td><td>".$gender."</td><td>".$phone1.       "</td></tr>";
      echo "</table>";
    ?>
    And here is the code to click on a row:
    $("#patienttable tr").click(function() {
           var passthis = $(this).find("#localid").html();
           $.post("php/setsessionvariable.php",
                  {sessionval: passthis},
         function(e) {window.location.href = "root.php"}
    EVERYTHING works great - no problems - working now for about 2 months.
    Today I started to build something similar, BUT! I cannot read from the database at the top of the page, I must do an ajax query, call the db, and post the data in a table;
    Here is the boring, fairly straight-forward javascript code:
    $.ajax({
        type: "POST",
        url: "findpatientbackend.php",
        data: {letterslastname: lastname},
        dataType : 'json',
        success: function(result) {
      $("#div1").html("");
            if(result.length >= 1)
       {var output = "";
             $("div1").html("<table id='findtable'>");
              $.each(result, function(index, value) {
                                                     output += "<tr><td width='100px'></td><td id='localid' width='100px'>"
                 + value.localid + "</td><td width='100px'>"
                 + value.lastname + "</td><td width='100px'>"
                 + value.firstname + "</td><td width='100px'>"
                 + value.middlename + "</td><td width='100px'>"
                 + value.dob + "</td></tr>";
                $("#div1").html(output);
             $("div1").html("</table>");  
        error : function() { alert("error on return"); }
    And here is the click row code, almost EXACTLY like the one above:
    $("#findtable tr").click(function() {
           var passthis = $(this).find("#localid").html();
           $.post("php/setsessionvariable.php",
                  {sessionval: passthis},
         function(e) {window.location.href = '../root.php'}
    All the "stuff" loaded onto the page just fine, BUT, absolutely nothing happens when I click a row.
    Playing around this afternoon, I did a "View Source" on both pages, and saw something VERY interesting;
    1 - The table written by PHP is present, can be seen, and therefore is "clickable" to the jquery .click function.
    2 - The table written by javascript is INVISIBLE! I cannot see it in the source view (but I can see it on the screen) and therefore the .click function can't see it either.
    Questions:
    1. How can I make the table written in javascript "clickable" - how can I make the javascript table "visible"?
    2. Could it be the use of ".html" to post the table to the div? Is there another way?
    And again, I thank you in advance for any help.

    I found the solution to my problem, and perhaps my comments here will help others.
    Thinking a bit more, I wrote a separate javascript routine that created a table, allowed it to be styled, and allowed it to be clickable.
    Here is the code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" type="text/javascript"></script>
    <style>
    #findtable {
    width:200px;
    background-color:#CFD3FE;
    margin:10px auto;
    text-align:center;}
    </style>
    <body>
    <div id="puttablehere"></div>
    <script>
    $(document).ready(function () {
    var output = "<table id='findtable'>";
    for (var i = 0; i<15; i++) {output += "<tr><td width='100px'>X</td><td id='localid' width='100px'>X</td></tr>";}
    output += "</table>";
    $("#puttablehere").html(output);
    $("#findtable tr").click(function(e) { alert("it works!"); });
    </script>
    </body>
    </html>
    The initial code I posted was creating the table the wrong way.
    You have to create the WHOLE table at the same time, and post it all at once.
    The code above does that.
    My learning points are:
    1. To create a table in javascript, and post it with a $("#puttablehere").html(output); call, you must put the ENTIRE table into that single string variable called "output" (or whatever you want to call it).
    2. Everytime you call a jqeury .html function like this: ---("#puttablehere").html(output); -- It COMPLETELY over-writes the whole div/tr/td block that it is pointed at.
    3. If you create a table in javascript (client side) you cannot see it with "View Source" - because what is posted in the table is AFTER the DOM is loaded.
    Creating a table with php server side - you CAN see, because it is posted with the DOM.
    So I thank you for your ideas, and I hope this may help another noob, such as myself, in the future.
    Adios!

  • TRUNCATE TABLE  does not work in procedure

    Hi Friends,
    I create a procedure that have a command TRUNCATE TABLE errdbg;
    It use to record data processing information. It iworks in SQLPLUS by manually.
    I put it in procedure and get message as
    Warning: Package Body created with compilation errors.
    SQL> show error;
    Errors for PACKAGE BODY DATALOAD:
    LINE/COL ERROR
    172/10 PLS-00103: Encountered the symbol "TABLE" when expecting one of
    the following:
    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    How to use TRUNCATE command in procedure?
    I can use delete. but it is not good for table space resused based on book.
    Thanks
    JIm

    You can't use DDL in pl/sql unless you use it with execute immediate
    e.g.,
    execute immediate 'truncate table errdbg' ;

  • FPM Message Manager message's HyperLink does not work in Table

    Hi FPM experts,
    I use FPM in my application and I want to use FPM Message Manager with hyperlink pointing to cells with errors in a table with report_bapiret2_message. The hyperlink does work when pointing on stand alone input field, but it does not work when pointing on a input field in a table.
    Here is a piece of my code. What's wrong?
      data is_message type bapiret2.
      is_message-type = 'E'.
      is_message-id = 'TEST'.
      is_message-number = '1'.
    wd_comp_controller->mr_fpm_message_manager->
       report_bapiret2_message( is_bapiret2 = is_message
                                             io_component = wd_comp_controller
                                             io_element = lo_el_table_elements " point on the element in my context
                                             iv_attribute_name = 'VALUE' ).  " Name of my attribute in context
    Thanks
    Davy
    Edited by: Davy Veilleux on Jan 4, 2009 4:19 PM

    Any answers to this question?
    I am facing the same issue. Using FPM Message Manager  with the io_element and iv_attribute parameters pointing to an element in an context node having cardinality = "0...n" does not show the hyper link.
    Any Help is Appreciated.

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • Copy and Paste does not work in filter statement of table data

    I am using SQL Developer 3.0.04. I can not copy nor paste in the filter criteria when watching or editing table data. Is it a bug or do I have to change some settings?

    Hi Sven,
    I did a bit more research and now I hope we will be talking about the same thing. Bear with me and let me clarify. In terms of my prior comment about the process necessary to copy a value from a data cell into the clipboard, I was totally off-base. Once the focus is on a data cell, all one need do is Edit menu|Copy or ctrl-c. I have no idea why I had trouble with that yesterday.
    Anyway, getting back to what's relevant with regard to your issue:
    1) If something is in the clipboard, then both Edit menu|Paste and ctrl-v work for a data cell target.
    2) If something is in the clipboard, then Edit menu|Paste fails for a data tab filter target.
    3) If something is in the clipboard, then ctrl-v works for a data tab filter target.
    So obviously conditions exist where pasting to the data tab filter can work. But here is a scenario where I found a problem similar to what you describe:
    1) For the EMP table in SCOTT, display all employees in the data tab.
    2) Apply a filter. For example, filter on JOB='SALESMAN'. Now 4 salesman, all in dept 30, are displayed.
    3) Next you decide to view only employees in dept 30.
    4) Copy the value 30 from the DEPTNO column. Carelessly put the focus on ENAME column in one of the data tab rows.
    5) Next focus on data tab filter to blank out JOB='SALESMAN' predicate. Drop down to select DEPTNO. Append an = sign.
    6) Finally Edit menu|Paste. Instead of seeing DEPTNO=30 in the filter, we see...
    7) The filter contains nothing and is disabled (greyed out).
    8) The ENAME column of the prior focus now contains the value 30 rather than the a salesman's name.
    Your case may be different/more complex, but at least this simple case demonstrates in a repeatable fashion what I noticed but didn't describe very well yesterday. I have logged the following internal bug:
    Bug 12753266 - EDIT MENU PASTE INTO DATA TAB FILTER DOES NOT WORK AND MAY DISABLE THE FILTER
    Using the rollback button, blanking out any filter value and hitting enter displays all original employee rows.
    Regards,
    Gary

  • ALTER TABLE command with owner does not work

    I performed the following statement in a SQLplus script where the variables were filled some lines before:
    alter table '&ownername||'.'||&tablename' move online tablespace '&tablespacename';
    However this does not work. I am getting:
    ERROR at line 1:
    ORA-00903: invalid table name
    The variables are replace correctly by SQLplus and everything owner, table, tablespace exist.
    Can I (as SYSDBA) not alter the table of another user?
    Peter

    Solomon Yakobson wrote:
    EdStevens wrote:
    Ok, you removed the mis-placed quotes, but why the double "." ??
    If you wish to append characters immediately after a substitution variable, use a <font color=red size=3>period</font> to separate the variable from the character.
    SY.Ah, I had simply never done it that way nor seen it done that way.

  • TableChanged() does not work with parrent table reference

    Hi,
    I used this example http://www.javalobby.org/articles/jtable/ where the cells refocus after updating, but I have rewrote it to my needs and the program throws nullpointerexception when I update any cell:(
    here is the tableChanged part of code:
        public class InteractiveTableModelListener implements TableModelListener {
            public void tableChanged(TableModelEvent evt) {
                if (evt.getType() == TableModelEvent.UPDATE) {
                    int column = evt.getColumn();
                    int row = evt.getFirstRow();
                    System.out.println("updated row: " + row + " column: " + column);
                   if((column + 1) >= model.getRowCount()){
                      table.removeColumnSelectionInterval(column,column);
                    }else{
                      table.setColumnSelectionInterval(column + 1, column + 1);
                    table.setRowSelectionInterval(row,row);
    }the table reference worked in the exaple but doesnt work in my program:(
    here is the init of the table in function initComponent:
            tableModel.addTableModelListener(new InteractiveTableModelListener());
            TableSorter sorter = new TableSorter(tableModel);
            JTable table = new JTable(sorter);the class is on the same level as the function
    i have searched all the internet for this with no results:(
    thank you for your advice!

    Yes, you are right, I wrote this post in a hurry and exhaused, that it does not work.
    I'm trying to write out a data file (now only a vector of data) in a JTable and I want to edit the rows and after I submit text in a cell, I want the caret to move one cell right, so the user can write another text, just like in MS Excel. At the end of the row the caret disapears but does not create another row.
    And I have problems with variable JTable table in the inner class that contains method tableChanged().
    Well After making an example I realized it worked and then I checked the example line by line and found out that I declare another JTable with the same name in the table initializing method,
    Then the variable couldnt work in tableChanged method... It was empty...
    I used your example from thread, you advised me:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class TableProcessing extends JFrame implements TableModelListener
         // here I declare the table
            protected JTable table;
         public TableProcessing()
              String[] columnNames = {"Item", "Quantity", "Price", "Cost"};
              Object[][] data =
                   {"Bread", new Integer(1), new Double(1.11), new Double(1.11)},
                   {"Milk", new Integer(1), new Double(2.22), new Double(2.22)},
                   {"Tea", new Integer(1), new Double(3.33), new Double(3.33)},
                   {"Cofee", new Integer(1), new Double(4.44), new Double(4.44)}
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              model.addTableModelListener( this );
                    // here I declare it again, which is a MISTAKE
              JTable table = new JTable( model )
                   //  Returning the Class of each column will allow different
                   //  renderers to be used based on Class
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
                   //  The Cost is not editable
                   public boolean isCellEditable(int row, int column)
                        int modelColumn = convertColumnIndexToModel( column );
                        return (modelColumn == 3) ? false : true;
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
          *  The cost is recalculated whenever the quantity or price is changed
         public void tableChanged(TableModelEvent e)
              System.out.println(e.getSource());
              if (e.getType() == TableModelEvent.UPDATE)
                   int row = e.getFirstRow();
                   int column = e.getColumn();
                   if (column == 1 || column == 2)
                                   // AND here is not initialised - throws NullPointerException
                        TableModel model = table.getModel();
                        int     quantity = ((Integer)model.getValueAt(row, 1)).intValue();
                        double price = ((Double)model.getValueAt(row, 2)).doubleValue();
                        Double value = new Double(quantity * price);
                        model.setValueAt(value, row, 3);
         public static void main(String[] args)
              TableProcessing frame = new TableProcessing();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • DB Adaptor import table option does not work with the AS400 DB

    1. The DB Adaptor import table option does not work with the IBM i-series(AS/400) tables(Both in ESB and BPEL).
    2. Also I was not able to import tables from multiple databases into
    the same BPEL project.

    Both of these issues work in preview version. My earlier posting was based on beta version testing.

Maybe you are looking for

  • Hi i just retired to iPhone 6 but my apps are not working please help

    apps are not working on my new iPhone 6

  • Is it possible to install voiceover to classic

    Hello, my friends! I have small problem. Im blind, so i cant use i-products without VoiceControl...  so. i try to use iphone of my non-blind friend with voice control.. its ok, but its to much of place,where i touch wrong buttons. and they in differe

  • Open & executin a c prg in server & tranfer output to client

    Please tell me how to execute a C program inside a Java program. That is, inside a server program in Java, and transfer the output of that program to the client and display it there... if you can with sample program Tel me...

  • Proposal Save Error

    Has anyone come across this error? There was an error in the callback.104|/wEWCQKmpb7DCgKpn5bCCwLNrvW5AwK9+p7tAgKquIyNCgKwnvjLDwLVj9WhAQK+vd+NBAKPkpStBCFi/5giRTTa7urrda7VMOUn6AAfs It actually saves the proposal, but the proposal is not in a functiona

  • Partner Function: Payer

    Hi In standard we can give  more then one ship to party, bill to party, and payer. But SP must be one. But where do we actually maintain Payer in sales cycle. As far as my knowledge we can  give  different SH in Delivery Doc , Bill to party in Billin