Failed to update comments table structure of ( AppSet - AppName)

Happy New Year Experts,
Version:  BPC Netweaver SP6
I am having an issue with adding a dimension to an application.  I am recieving the following error message:
Failed to update comments table structure of ( AppSet - AppName)
Here is the order of events that led me to this issue:
1.  I created a "U" dimension
2.  I created all associated properties for this dimension
3.  I added the dimension to the application
4.  I deleted the dimension
5.  I re-created the dimension with the exact same name (this worked just fine)
6.  When I add the dimension back to the application, I recieve that error message
I am not certain why this is happening, I can add a dim with a different name just fine, but I need\want to use the name that it is rejecting.
Any assistance that anyone can provide would be greatly appreciated.
Thank you,
Mark J. Glowczewski

I figured out that the issue with this error messaged related to the dimension name being a reserved word in BPC Netweaver.
The Dim name I was using was "Part".
Once I changed the dimension name, I was able to to successfully add the dim to my applicaiton.
Thank you,
Mark J. Glowczewski

Similar Messages

  • Flex 3: Update SQLite Table Structure?

    I don't have any issues with creating my table when it doesn't exist but I have a quesion about updating the table structure.  For instance I want to add two new fields if they don't exist.
    Does anyone have an example of updating table structure?  Process flow would have to first check for table, if it doesn't exits then create it. If it does exist then check it has all the correct fields.  If it doesn't then update table structure. 
    Is there a built in way to do this with SQLite?
    Here is my current code...
    private function getRecords():void
    var sqlQuery:String = "CREATE TABLE IF NOT EXISTS Roster (" +
                            "selected TEXT DEFAULT 'false' NOT NULL,"+
                            "name    TEXT        NOT NULL," +
                            "time     TEXT        NOT NULL," +
                            "gender     TEXT        NOT NULL" +
    dbStatement = new SQLStatement();
    dbStatement.itemClass = Roster;
    dbStatement.sqlConnection = exampleDB;
    dbStatement.text = sqlQuery;
    dbStatement.addEventListener(SQLEvent.RESULT, onDBStatementSelectResult);
    dbStatement.execute();
    sqlQuery= "select * from Roster";
    dbStatement.text = sqlQuery;
    dbStatement.addEventListener(SQLEvent.RESULT, onDBStatementSelectResult);
    dbStatement.execute();
    I want to add in two new fields is possible without asking user to delete the table first.
                            "wins TEXT DEFAULT '0' NOT NULL," +
                            "loses TEXT DEFAULT '0' NOT NULL" +
    Thanks in advance.

    Looks like you need a single column to identify the type of user (M,C or A) Much better this scenario described here
    http://vyaskn.tripod.com/row_level_security_in_sql_server_databases.htm
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • VPN connection created with CMAK fails to update routing table on Windows 8.1 with error 8000ffff

    When my clients connect their CMAK-created VPN, it fails to run the script to set their routing table with the following error:
    Custom script (to update your routing table) failed (8000ffff)
    My objective is to create a VPN connection with split tunneling - does not use the VPN connection as the client's default gateway.
    All my clients are on Windows 8.1 64-bit, and are logged in with Administrative privileges
    My VPN Clients are on 10.242.2.0/24, my internal network is on 10.172.16.0/24
    I want only traffic for 10.172.16.0 to go via the VPN. Everything else should go via the client's internet connection
    My Connection Manager Administration Kit profile, was created on Windows 2012 R2 CMAK with the following settings:
    "Make this connection the client's default gateway" is UNticked on the IPv4 tab.
    Define a routing table update is specified with a text file containing:
    +++ Start of txt file +++
    REMOVE_GATEWAY
    add 10.172.16.0 mask 255.255.255.0 default metric default if default
    +++ End of txt file +++
    The txt file is saved in DOS/Windows format (not Unicode or UTF-8 which I've read causes problems)
    I've tried everything in lower and upper case in the txt file after reading that the file might be case sensitive
    The following appears on the client with logging enabled:
    [cmdial32] 10:42:34
    03 Pre-Init Event       CallingProcess = C:\WINDOWS\system32\rasautou.exe
    [cmdial32] 10:42:40
    04 Pre-Connect Event    ConnectionType = 1
    [cmdial32] 10:42:40
    06 Pre-Tunnel Event     UserName = UserName Domain =  DUNSetting = VPN (L2TP x64 NoGW) Tunnel DeviceName =  TunnelAddress = vpn.mydomain.tld
    [cmdial32] 10:42:43
    07 Connect Event
    [cmdial32] 10:42:43
    09 Custom Action Exe    ActionType = Connect Actions Description = (none) ActionPath = CMDL32.EXE. The program was launched successfully.
    [cmdial32] 10:42:43
    08 Custom Action Dll    ActionType = Connect Actions Description = to update your routing table ActionPath = C:\Users\UserName\AppData\Roaming\Microsoft\Network\Connections\Cm\VPN64\CMROUTE.DLL ReturnValue
    = 0x8000ffff
    [cmdial32] 10:42:43
    21 On-Error Event       ErrorCode = -2147418113 ErrorSource = to update your routing table
    [cmdial32] 10:42:43
    13 Disconnect Event     CallingProcess = C:\WINDOWS\system32\cmdial32.dll
    Where can I find out what error codes 8000ffff or -2147418113 mean?

    That was it. Thanks, Steven
    "By default, the dial-up entry and the VPN entry have Make this connection the default gateway selected.
    Leave this default in place, and remove any gateways by using the REMOVE_GATEWAY command in the routing table update file itself."
    It seems counter-intuitive to leave
    Make this connection the default gateway selected, when I specifically don't want that behaviour, but leaving it selected and using REMOVE_GATEWAY works for me.

  • CRUD using ADF fails to update database table

    Hi All,
    I am very new to ADF and JDev. I am using JDev 11.1.1.2.0 and oracle 10g DB.
    I have created the required
    1. model, view control, Data control files using JDev for a DB table.
    2. .jspx file that has a 'panel accordin' and a 'panel formLayout' layouts to display the required table fields on the page.
    I am using Panel accordin layout to display the data with navigators buttons and works fine.
    In Panel Form layout, after displaying the fields I have added "Submit" button. I have bound this button with "Commit" operation by simple drag and drop.
    PS: I have added the fields by simple drag drop of the data control file mapped to the table in question.
    On running the page I find things work fine till I want to use the submit button. It just updates the UI front but when I verify in my database table I find that it has not been updated.
    I am clueless. Pls guide.
    A site with step - by - step end to end development will be very great.
    Waiting desparately to get this solved.
    Thanks all
    Edited by: user8925296 on Jan 16, 2010 2:13 AM

    You need to be careful. Submit and committing to the database are two different things.
    Submit on a page (and autoSubmit the property) are only posting the changes you typed into the field, back down to the application server. NOTHING is happening with the database at this point. So the applications's internal "cache" of records (using something like ADF BC) is holding the changes but the database doesn't know anything. So if you quit now, no changes will go to the database.
    These changes onlyget submitted down to the app server when you do some sort of action like press a button. Simply navigating fields will be doing nothing back to the app server. If you add autoSubmit then you will automatically submit the changes on that field down to the app server when you leave the field (but again, this is not touching the database)
    You have to explicitly add a COMMIT operation to save those changes to the database.
    Maybe if you try in a simple EMP example and send us your findings we can help direct you further.
    Regards
    Grant

  • Polling for database updates fails to update sequence file/table

    I have a small system to poll for changes to a database table of student details. It consists of:
    Database adapter, which polls the database for changes, retreives a changed row, and passes the generated XML to -
    "receive" router service, which simply passes the retrieved database XML data to -
    "execute" router service, which transforms the XML and passes the new message to -
    File Adapter, which writes the transformed XML to a file.
    The problem is that the database polling is not updating the sequence recorder - I have tried using a sequence file which stores the personnumber, a sequence table which stores the personnumber and a sequence table which stores the last-updated timestamp. In all cases the database adapter successfully reads the sequence file/table and retreives the correct row, based on the sequence value ( I have tested this by manually changing the sequence value), the data is transformed and a correct xml file is created, but the system then fails to update the sequence file/table so that when the next polling time comes around the very same database row is extracted again and again and again.
    In the ESB control panel I have one error: "Response payload for operation "receive" is invalid!"
    The Trace is:
    oracle.tip.esb.server.common.exceptions.BusinessEventRejectionException: Response payload for operation "receive" is invalid! at oracle.tip.esb.server.service.EsbRouterSubscription.processEventResponse(Unknown Source) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(Unknown Source) at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(Unknown Source) at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(Unknown Source) at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(Unknown Source) at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:281) at oracle.tip.adapter.db.InboundWork.onMessageImpl(InboundWork.java:1381) at oracle.tip.adapter.db.InboundWork.onMessage(InboundWork.java:1291) at oracle.tip.adapter.db.InboundWork.transactionalUnit(InboundWork.java:1262) at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:501) at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:401) at oracle.tip.adapter.db.inbound.InboundWorkWrapper.run(InboundWorkWrapper.java:43) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819) at java.lang.Thread.run(Thread.java:595)
    The payload is:
    <PersonCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/ISSSimIN">
    <Person>
    <name>Bob</name>
    <surname>Stupid</surname>
    <istatus>2</istatus>
    <active>Active</active>
    <personnumber>3001</personnumber>
    <role>Staff</role>
    <organization>TEX</organization>
    <updateTimestamp>2007-11-29T14:06:55.000+00:00</updateTimestamp>
    </Person>
    </PersonCollection>
    The payload above is the XML output from the Database adapter, the xsd for which was autogenerated by JDeveloper, so I don't understand how it can be invalid.
    I have only been working with ESB for 3 days, but half of that time has now been spent stuck on this issue. Anyone got any ideas??
    Richard

    You need to be careful. Submit and committing to the database are two different things.
    Submit on a page (and autoSubmit the property) are only posting the changes you typed into the field, back down to the application server. NOTHING is happening with the database at this point. So the applications's internal "cache" of records (using something like ADF BC) is holding the changes but the database doesn't know anything. So if you quit now, no changes will go to the database.
    These changes onlyget submitted down to the app server when you do some sort of action like press a button. Simply navigating fields will be doing nothing back to the app server. If you add autoSubmit then you will automatically submit the changes on that field down to the app server when you leave the field (but again, this is not touching the database)
    You have to explicitly add a COMMIT operation to save those changes to the database.
    Maybe if you try in a simple EMP example and send us your findings we can help direct you further.
    Regards
    Grant

  • Failed to update table name (location): Failed to open connection.

    Folks,
    ENV : SQL Server 2005, CR 2008 SP3, Windows Server 2003
    All the reports are working fine except for 4 of them. All of them demonstrate the same symptoms.
    Failed to print/preview report with the error 'A Crystal Reports job failed: Failed to update table name (location): Failed to open connection. Failed to open connection. COA.rpt
    All the reports use OLE DB connection. I have verified the the DB Connection Information. It's the same across all the rpt files.
    Please help.
    Regards,
    Balaji K

    Hi,
    Additional Info:
    CR 2008 SP3 is called by an application using .net. The Application passes a couple of parameters to the CR report. I'm able to preview the report. All the reports use the same set of parameters.
    Balaji K

  • Open Hub Destination table structure update

    Hi,
         I created a open Hub detsination and activation created the table  and populated the data in the table and have a view over the table.
         I need to add few more fields in the open hub and when I did that and activated again , it is supposed to change the table structure adding the new fields that were added in the open hub.
       The activation was successful but the table structure still stays the same.I didn't see the new fields in the generated table.
       Anyone having similar issues.
      Thanks in advance

    We deleted all the related objects from Staging and production and re transported them from Development as though they are being sent for the first time and that works.Tough this approach is not good we need to use it as I didn't find any other solution

  • Vendor-Customer balances in group currency-table/structure/function module?

    Hi All,
    Which table/structure/function module can be used to get balances for vendors and customers in group currency? We just wnat to extract balances in group currency so FBL1N and FBL5N are not options. Is there any SAP report which can provide these balances for both vendors and customers?
    Thanks and regards,
    Pinky

    Hi Pinky,
    I came across one report S_ALR_87012079 - Transaction Figures: Account Balance, Program RFSRRCUA, which extracts Account Balances of Vendor. Once the report is executed, you can do Currency Translation from one currency to different currencies. In the output screen, in the Top Menu, select 'Settings -> Currency' and you can convert to another currency. I am not sure, if this helps you. If this helps, kindly update your comments here.
    Thank you.
    Suresh Jayanthi.

  • Export table structure in datapump

    Hi,
    Oracle Version : 10.2.0.1 and 11.2.0.1
    Operating system:Linux
    I need an help regarding to export only the table structure in 10g.
    In 11g when i tried to export table structure for the tables which starts with ST_LO_% it works fine and here is the output for that export statement.
    [oracle@vtlsys2-209 dbdump]$ expdp CNGSTORES_TEST_DEC1610/CNGSTORES_TEST_DEC1610 directory=dbdump dumpfile=chala_feb2111.dmp logfile=chala_feb2111.log tables="ST_IL_%","ST_LO_%","SCM%","ARCH%" exclude=statistics,grants job_name=tablesfil parallel=4 version=10.2  content=metadata_only
    Export: Release 11.2.0.1.0 - Production on Mon Feb 21 14:34:16 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    UDE-01017: operation generated ORACLE error 1017
    ORA-01017: invalid username/password; logon denied
    Username: cngstores_test_dec1610/cngstores_test_dec1610
    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
    Starting "CNGSTORES_TEST_DEC1610"."TABLESFIL":  cngstores_test_dec1610/******** directory=dbdump dumpfile=chala_feb2111.dmp logfile=chala_feb2111.log tables=ST_IL_%,ST_LO_%,SCM%,ARCH% exclude=statistics,grants job_name=tablesfil parallel=4 version=10.2 content=metadata_only
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/COMMENT
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
    Master table "CNGSTORES_TEST_DEC1610"."TABLESFIL" successfully loaded/unloaded
    Dump file set for CNGSTORES_TEST_DEC1610.TABLESFIL is:
      /u05/dbdump/chala_feb2111.dmp
    Job "CNGSTORES_TEST_DEC1610"."TABLESFIL" successfully completed at 14:34:37But when i tried in 10g it is throwing errors and below is the export script.
    [oracle@VTL1253AD dbdump]$  expdp aa_test/aa_test directory=dbdump dumpfile=st_LO_IL_EMPTYTABLES.dmp logfile=st_LO_IL_EMPTYTABLES.log content=metadata_only job_name=aa_empty tables="ST_LO_%","ST_IL_%"
    Export: Release 10.2.0.1.0 - Production on Monday, 21 February, 2011 14:03:18
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "AA_TEST"."AA_EMPTY":  aa_test/******** directory=dbdump dumpfile=st_LO_IL_EMPTYTABLES.dmp logfile=st_LO_IL_EMPTYTABLES.log content=metadata_only job_name=aa_empty tables=ST_LO_%,ST_IL_%
    ORA-39166: Object ST_IL_% was not found.
    ORA-39166: Object ST_LO_% was not found.
    ORA-31655: no data or metadata objects selected for job
    Job "AA_TEST"."AA_EMPTY" completed with 3 error(s) at 14:03:24Can any one please help me how to export table structure that are starting with ST_LO_% and ST_IL_%.
    Please help me.
    Thanks & Regards,
    Poorna Prasad.S

    Hi N Gasparotto ,
    Thanks for your quick replay .
    Here when i use to export tables ST_LO% in the include parameter it is working fine .
    [oracle@VTL1253AD ~]$ expdp aa_test/aa_test directory=dbdump dumpfile=aa_test_feb2111_st_loil.dmp logfile=aa_test_feb2111_st_LO.log   parallel=4 job_name=aa_test1 content=metadata_only include=table:\"like \'ST_LO_%\'\"
    Export: Release 10.2.0.1.0 - Production on Monday, 21 February, 2011 15:10:30
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "AA_TEST"."AA_TEST1":  aa_test/******** directory=dbdump dumpfile=aa_test_feb2111_st_loil.dmp logfile=aa_test_feb2111_st_LO.log parallel=4 job_name=aa_test1 content=metadata_only include=table:"like 'ST_LO_%'"
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/COMMENT
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    Master table "AA_TEST"."AA_TEST1" successfully loaded/unloaded
    Dump file set for AA_TEST.AA_TEST1 is:
      /u04/dbdump/aa_test_feb2111_st_loil.dmp
    Job "AA_TEST"."AA_TEST1" successfully completed at 15:10:39but when i tried to export tables that start ST_LO_% and ST_IL_% the export is failing.
    [oracle@VTL1253AD ~]$ expdp aa_test/aa_test directory=dbdump dumpfile=aa_test_feb2111_st_loil.dmp logfile=aa_test_feb2111_st_LO.log   parallel=4 job_name=aa_test1 content=metadata_only include=table:\"like \'ST_LO_%\'\",table:\"like \'ST_IL_%\'\"
    Export: Release 10.2.0.1.0 - Production on Monday, 21 February, 2011 15:07:35
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "AA_TEST"."AA_TEST1":  aa_test/******** directory=dbdump dumpfile=aa_test_feb2111_st_loil.dmp logfile=aa_test_feb2111_st_LO.log parallel=4 job_name=aa_test1 content=metadata_only include=table:"like 'ST_LO_%'",table:"like 'ST_IL_%'"
    ORA-39168: Object path TABLE was not found.
    ORA-31655: no data or metadata objects selected for job
    Job "AA_TEST"."AA_TEST1" completed with 2 error(s) at 15:07:41
    [oracle@VTL1253AD ~]$ expdp aa_test/aa_test directory=dbdump dumpfile=aa_test_feb2111_st_loil.dmp logfile=aa_test_feb2111_st_LO.log   parallel=4 job_name=aa_test1 content=metadata_only include=table:\"like \'ST_LO_%\',\'ST_IL_%\'\"
    Export: Release 10.2.0.1.0 - Production on Monday, 21 February, 2011 15:08:56
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39001: invalid argument value
    ORA-39071: Value for INCLUDE is badly formed.
    ORA-00933: SQL command not properly endedCan you please help me what was the mistake i am doing in my export script when trying to export ST_LO_%,ST_IL_%.
    Regards,
    Poorna Prasad.S

  • Importing a Flat File to Oracle and updating another table

    Hey everyone,
    I am a newbie with Oracle, and I've tried for the last 2 days to solve this problem below. But all my searches and attempts have failed.
    I have a text file called ReturnedFile.txt. This is a comma separated text file that contains records for two fields.... Envelope and Date Returned.
    At the same time, I have a table in Oracle called Manifest. This table contains the following fields:
    Envelope
    DateSentOut
    DateReturned
    I need to write something that imports the ReturnedFile.txt into a temporary Oracle table named UploadTemp, and then compares the data in the Envelope field from UploadTemp with the Envelope field in Manifest. If it's a match, then the DateReturned field in Manifest needs updated with the DateReturned field in UploadTemp.
    I've done this with SQL Server no problem, but I've been trying for two days to make this work with Oracle and I can't figure it out. I've been trying to use SQL*Loader, but I can't even get it to run properly on my machine.
    I did create a Control file, saved as RetFile.ctl. Below is the contents of the CTL file:
    LOAD DATA
    INFILE 'C:\OracleTest\ReturnedFile.txt'
    APPEND
    INTO TABLE UploadTemp
    FIELDS TERMINATED BY "'"
    ENVELOPE,
    DATERETURNED
    If I could get SQL*Loader running, below is the code I came up with to import the text file and then to do the compare to the Manifest table and update as appropriate:
    sqlldr UserJoe/Password123 CONTROL=C:\OracleTest\RetFile.ctl LOG=RetFile.log BAD=RetFile.bad
    update Manifest m set m.DateReturned =
    (select t.DateReturned
        from UploadTemp t
        where m.Envelope = t.Envelope
    That's all I got. As I said, I can't find a way to test it and I have no idea if it's even close.
    PLEASE...can anyone assist me? Am I even close on this thing?
    Joe

    If your ReturnedFile.txtfile is comma separated then you need TERMINATED BY "," not TERMINATED BY "'" in your control file.  If there happens to not be an ending comma in any row, then you also need to add TRAILING NULLCOLS to your control file.  You should also use a date format for your date in your control file that corresponds to the date format in your ReturnedFile.txt file, in case it does not match the date format on your system.  You need to add a WHERE EXISTS clause to your update statement to prevent any rows that do not match from having the DateReturned updated to a null value.  Please see the example below.  If this does not help then please do a copy and paste as I did, that includes a few rows of sample data and table structure.  It would also help to see your SQL*Loader log file or a SQL*Loader error message.  If you can't get SQL*Loader to run properly, then you may have other issues, such as file permissions at the operating system level.  There are also other options besides the methods below.  For example, you could use an external table, instead of SQL*Loader, if your ReturnedFile.txtfile is on your serer, not your client.  You could also use merge instead of update.
    SCOTT@orcl_11gR2> host type returnedfile.txt
    env2,03-07-2013
    env3,04-07-2013
    env4,05-07-2013
    SCOTT@orcl_11gR2> host type retfile.ctl
    LOAD DATA
    INFILE 'ReturnedFile.txt'
    APPEND
    INTO TABLE UploadTemp
    FIELDS TERMINATED BY ","
    trailing nullcols
    (ENVELOPE
    , DATERETURNED date "dd-mm-yyyy")
    SCOTT@orcl_11gR2> create table uploadtemp
      2    (envelope         varchar2(15),
      3     datereturned  date)
      4  /
    Table created.
    SCOTT@orcl_11gR2> create table Manifest
      2    (Envelope         varchar2(15),
      3     DateSentOut   date,
      4     DateReturned  date)
      5  /
    Table created.
    SCOTT@orcl_11gR2> insert all
      2  into manifest values ('env1', sysdate-7, sysdate-3)
      3  into manifest values ('env2', sysdate-6, null)
      4  into manifest values ('env3', sysdate-5, null)
      5  select * from dual
      6  /
    3 rows created.
    SCOTT@orcl_11gR2> select * from manifest
      2  /
    ENVELOPE        DATESENTO DATERETUR
    env1            28-JUN-13 02-JUL-13
    env2            29-JUN-13
    env3            30-JUN-13
    3 rows selected.
    SCOTT@orcl_11gR2> host sqlldr scott/tiger CONTROL=RetFile.ctl LOG=RetFile.log BAD=RetFile.bad
    SQL*Loader: Release 11.2.0.1.0 - Production on Fri Jul 5 13:15:06 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 3
    SCOTT@orcl_11gR2> select * from uploadtemp
      2  /
    ENVELOPE        DATERETUR
    env2            03-JUL-13
    env3            04-JUL-13
    env4            05-JUL-13
    3 rows selected.
    SCOTT@orcl_11gR2> update Manifest m
      2  set m.DateReturned =
      3    (select t.DateReturned
      4     from   UploadTemp t
      5     where  m.Envelope = t.Envelope)
      6  where exists
      7    (select t.DateReturned
      8     from   UploadTemp t
      9     where  m.Envelope = t.Envelope)
    10  /
    2 rows updated.
    SCOTT@orcl_11gR2> select * from manifest
      2  /
    ENVELOPE        DATESENTO DATERETUR
    env1            28-JUN-13 02-JUL-13
    env2            29-JUN-13 03-JUL-13
    env3            30-JUN-13 04-JUL-13
    3 rows selected.

  • ADF master-detail master selection not updating detail tables properly

    Hi All,
    I am using JDev version : 11.1.2.0.0
    I created new Fusion Web Application Module. In that module I created a master-detail data model and added them to a page fragment with a query panel. When I run it as a separate module, It works perfectly and Master selection correctly updates detail tables.
    But when I integrate that module to another Fusion Application(Add application jar file to the Master Application libraries), Master-details master selection not updating detail tables properly. This problem occurred sequentially.
    The problem is that.
    After the page load, first selection of the Master Table works correctly and detail tables update correctly.
    But second selection doesn't work, means detail table doesn't get update according to the Master table.
    And again in the third selection works correctly.
    This happens in a sequential manner. I monitor the behavior using Firebug. Observations are as follows,
    When running correctly, Response of the Post Definition is
    <?xml version="1.0" ?> <partial-response><changes><update id="pt1:t1"><![CDATA[<div tabindex="0" id="pt1:t1" class="xpa xpi" _leafColClientIds="['pt1:t1:c1','pt1:t1:c2','pt1:t1:c3','pt1:t1:c4','pt1:t1:c5','pt1:t1:c6','pt1:t1:c7','pt1:t1:c8','pt1:t1:c9','pt1:t1:c10','pt1:t1:c11','pt1:t1:c12','pt1:t1:c13']"><div id="pt1:t1::ch" style="overflow:hidden;position:relative;width:1365px;" _afrColCount="13" class="xz4"><table class="xz6" summary="This table contains column headers corresponding to the data body table below" id="pt1:t1::ch::t" style="position:relative;table-layout:fixed;width:1365px" cellspacing="0"><tr><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th><th style="padding:0px;padding-left:5px;width:100px;"></th></tr><tr><th id="pt1:t1:c1" _d_index="0" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c1::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">DateFormat</div></th><th id="pt1:t1:c2" _d_index="1" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c2::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">DefinisionId</div></th><th id="pt1:t1:c3" _d_index="2" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c3::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldId</div></th><th id="pt1:t1:c4" _d_index="3" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c4::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldLabel</div></th><th id="pt1:t1:c5" _d_index="4" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c5::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldLength</div></th><th id="pt1:t1:c6" _d_index="5" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c6::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldOffset</div></th><th id="pt1:t1:c7" _d_index="6" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c7::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldOrder</div></th><th id="pt1:t1:c8" _d_index="7" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c8::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldStatus</div></th><th id="pt1:t1:c9" _d_index="8" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c9::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldType</div></th><th id="pt1:t1:c10" _d_index="9" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c10::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">FieldTypeLen</div></th><th id="pt1:t1:c11" _d_index="10" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c11::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">IgnoreField</div></th><th id="pt1:t1:c12" _d_index="11" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c12::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">IsMandatory</div></th><th id="pt1:t1:c13" _d_index="12" _afrLeaf="true" _afrRoot="true" align="left" class="xz7"><div style="position:relative; float:right"><table id="pt1:t1:c13::afrSI" _afrHoverable="true" style="display:none" class="xzs" cellpadding="0" cellspacing="0"><tr><td _afrSortAsc="1"><a tabIndex="-1" class="xza" title="Sort Ascending"></a></td><td _afrSortDesc="1"><a tabIndex="-1" class="xzb" title="Sort Descending"></a></td></tr></table></div><div class="x19d">RecordType</div></th></tr></table></div><div id="pt1:t1::db" class="xyx" style="position:relative;width:100%;overflow:hidden" _afrColCount="13"></div><div id="pt1:t1::sm" class="xzt" style="position:absolute;display:none"></div><div id="pt1:t1::ri" class="xyz" style="position:absolute;display:none;overflow:hidden"></div><div id="pt1:t1::dataW" style="display:none"></div></div>]]></update><update id="f1::postscript"><![CDATA[<span id="f1::postscript"><span id="f1::postscript:st"><input type="hidden" name="javax.faces.ViewState" value="!-75cc188st"></span></span>]]></update><update id="d1::iconC"><![CDATA[<span id="d1::iconC" style="display:none"><span id="af_table::disclosed-icon"></span><span id="af_table::undisclosed-icon"></span></span>]]></update><update id="javax.faces.ViewState"><![CDATA[!-75cc188st]]></update><eval><![CDATA[AdfPage.PAGE.__handleRichResponseAction('/MillenniumCSD-ViewController-context-root/faces/FileDefinition?_adf.ctrl-state=cmpl0ptfg_7');]]></eval><eval><![CDATA[AdfPage.PAGE.sendStreamingRequest("pt1:t1");]]></eval><extension id="adf-script-library">/MillenniumCSD-ViewController-context-root/afr/partition/gecko/default/opt/dnd-SHERMAN-1147.js</extension><extension id="adf-script-library">/MillenniumCSD-ViewController-context-root/afr/partition/gecko/default/opt/nav-SHERMAN-1147.js</extension><extension id="adf-script-library">/MillenniumCSD-ViewController-context-root/afr/partition/gecko/default/opt/menu-SHERMAN-1147.js</extension><extension id="adf-script-library">/MillenniumCSD-ViewController-context-root/afr/partition/gecko/default/opt/table-SHERMAN-1147.js</extension><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/JarLoaderPages/jquery-1.7.1.min.js');</eval><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/JarLoaderPages/dis_contx.js');</eval><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/js/floating_bar_bottom.js');</eval><eval>if(self.window.name != "MillenniumDepository"){   self.location = "mcsd.html";   }</eval><eval><![CDATA[AdfDhtmlLookAndFeel.addSkinProperties({"af|table-tr-column-scroll-animation-duration":"300","af|table-tr-column-reorder-animation-duration":"600","af|table-tr-hover-highlight-row":"true"});AdfPage.PAGE.addComponents(new AdfRichTable('pt1:t1',{'rowSelection':'single','rowBandingInterval':0,'editingMode':'none','afrSelListener':true}),new AdfRichColumn('pt1:t1:c1',{'sortProperty':'DateFormat','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c2',{'sortProperty':'DefinisionId','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c3',{'sortProperty':'FieldId','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c4',{'sortProperty':'FieldLabel','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c5',{'sortProperty':'FieldLength','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c6',{'sortProperty':'FieldOffset','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c7',{'sortProperty':'FieldOrder','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c8',{'sortProperty':'FieldStatus','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c9',{'sortProperty':'FieldType','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c10',{'sortProperty':'FieldTypeLen','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c11',{'sortProperty':'IgnoreField','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c12',{'sortProperty':'IsMandatory','sortable':true,'minimumWidth':12,'rowHeader':false}),new AdfRichColumn('pt1:t1:c13',{'sortProperty':'RecordType','sortable':true,'minimumWidth':12,'rowHeader':false}));AdfPage.PAGE.__recordSessionTimeout(1800000, 120000, "http://127.0.0.1:7101/MillenniumCSD-ViewController-context-root/faces/FileDefinition");AdfPage.PAGE.__initPollingTimeout(600000);AdfPage.PAGE.clearMessages();AdfPage.PAGE.clearSubtreeMessages('pt1:t1');AdfPage.PAGE.clearSubtreeMessages('pt1:resId1');]]></eval></changes></partial-response>
    When not running correctly, Response of the Post Definition is
    <?xml version="1.0" ?> <partial-response><changes><update id="f1::postscript"><![CDATA[<span id="f1::postscript"><span id="f1::postscript:st"><input type="hidden" name="javax.faces.ViewState" value="!-75cc188st"></span></span>]]></update><update id="javax.faces.ViewState"><![CDATA[!-75cc188st]]></update><eval><![CDATA[AdfPage.PAGE.__handleRichResponseAction('/MillenniumCSD-ViewController-context-root/faces/FileDefinition?_adf.ctrl-state=cmpl0ptfg_7');]]></eval><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/JarLoaderPages/jquery-1.7.1.min.js');</eval><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/JarLoaderPages/dis_contx.js');</eval><eval>AdfPage.PAGE.addResource('javascript','/MillenniumCSD-ViewController-context-root/js/floating_bar_bottom.js');</eval><eval>if(self.window.name != "MillenniumDepository"){   self.location = "mcsd.html";   }</eval><eval><![CDATA[AdfPage.PAGE.__recordSessionTimeout(1800000, 120000, "http://127.0.0.1:7101/MillenniumCSD-ViewController-context-root/faces/FileDefinition");AdfPage.PAGE.__initPollingTimeout(600000);AdfPage.PAGE.clearMessages();AdfPage.PAGE.clearSubtreeMessages('pt1:t1');AdfPage.PAGE.clearSubtreeMessages('pt1:resId1');]]></eval></changes></partial-response>
    I could not figure out what went wrong when integrating to another module.
    Can you please help me to rectify this problem.
    Thanks
    dk

    Hi,
    sound to be an implementation specific issue that is hard to comment on without knowing how to reproduce it. If you have a rerooducible test case based on the Oracle HR schema using JDeveloper 11.1.1.6, zip it up, rename the "zip "extension to "unzip" and sent it to the mail address you find in my OTN profile. If you don't have that test case, explain how this can be reproduced
    Frank

  • Progammatic update a table with a database view  in the page

    Hi All,
    I am using JDev 11g. With FOD database schema, I have one database view Products which comes from two tables Products_Base and Product_Transactions. I created three EOs (ProductEO, ProductsBaseEO, ProductTransactionsEO) and three VOs (ProductVO, ProductsBaseVO, ProductTransactionsVO) based on their EOs respectively.
    Here is my scenario. I have an ADF form which is based on the database view Products and is dragged and dropped from Data Controls->ProductVO. When an existing record is submitted, a backing bean method will be called to update the data against the table Products_Base (and the table Product_Transactions at the same time) programmatically. An update method updateProductPrice() is added into the Application Module and published it to UI Client. The submit button in the page is created by directly dragging and dropping Data Controls->updateProductPrice into the page. When I run it, I got the following error message,
    Failed to post data to database during "Update": SQL Statement "UPDATE PRODUCTS ProductEO SET COST_PRICE=:1 WHERE PRODUCT_ID=:2".
    What I don't understand here is that, in my update method updateProductPrice(), it supposes to update the table Products_Base. But from the error, it appears that it is trying to update the view Products. Can anyone give me a help on what I did wrong here? When I try to debug it, it throws an exception to this line in the method updateProductPrice(),
    getDBTransaction().commit();
    Here are my codes,
    The method which got called in the backing bean
    public String cb6_action() {
    DCBindingContainer bc = (DCBindingContainer)getBindings();
    FacesCtrlAttrsBinding ProductId = (FacesCtrlAttrsBinding)bc.get("ProductId");
    FacesCtrlAttrsBinding CostPrice = (FacesCtrlAttrsBinding)bc.get("CostPrice");
    JUCtrlActionBinding action =
    (JUCtrlActionBinding)bc.findCtrlBinding("updateProductPrice");
    DCDataControl dc = action.getDataControl();
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    AppModule service = (AppModule)am;
    service.updateProductPrice(new Long(ProductId.toString()), CostPrice.toString());
    return null;
    public BindingContainer getBindings() {
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    The update method defined in the Application module (AppModuleImpl.java)
    public void updateProductPrice(long productId, String costPrice) {
    ProductsBaseEOImpl product = retrieveProductById(productId);
    if (product != null) {
    try {
    product.setCostPrice(new Number(costPrice));
    getDBTransaction().commit();
    catch (JboException ex) {
    getDBTransaction().rollback();
    throw ex;
    catch (SQLException ex1) {
    getDBTransaction().rollback();
    private ProductsBaseEOImpl retrieveProductById(long productId) {
    EntityDefImpl productDef = ProductsBaseEOImpl.getDefinitionObject();
    Key productKey = ProductsBaseEOImpl.createPrimaryKey(new DBSequence(productId));
    return (ProductsBaseEOImpl)productDef.findByPrimaryKey(getDBTransaction(),productKey);
    Edited by: john wang on Oct 27, 2009 7:14 AM

    or
    merge into test
    using (select rowid rid
                , id
                , sub_id
                , startdate
                , lead (startdate) over (order by id, sub_id) - 1 ed
           from test) x
    on (x.rid = test.rowid)
    when matched then
       update set end_date = x.ed
    ;

  • How to update Spry-table and present the updated table in a div element?

    Hello!
    I am using a very interesting AJAX-framework called Spry when designing a web page. Here the web page is: Link.
    I need some help.
    Every time a new project or shift is added, the changes are written to an xml-file. When the page is reloaded, Spry reads data from xml-files.
    This is caused by this code:
    dsProjects = new Spry.Data.XMLDataSet("timetable/projects.xml", "projects/project");
    dsShifts = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project/shift"); //look inside projects.xml and //extrac xml-file. url
    dsName = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project");
    I call this function that I have written: loadProjectsIntoDivElement ().
    This function does the following: [See attached code.]
    It iterates through the Spry-datastructure and puts the data in a table inside of the div-element called 'projectsList'.
    Now, when I add a new project, I want it to be inserted into the Spry-datastructure and then cause the new data to be written into the div element called 'Specials_DIV'.
    I have found out how to update a Spry-datastructure (e.g. dsProjects above), but I don't know how to update the table containing the data without refreshing the page. This should be done using Spry.
    Some code:
    1:
    2:
    3:
    function loadProjectsIntoDivElement () {
    $('#projectsList').html('');
    $('#projectsList').append('<table id="Specials_Table"><tr><th spry:sort="id">ID</th><th spry:sort="NAME">Name </th><th spry:sort="hoursestimated">Nr. of hours estimated</th><th spry:sort="hoursworked">Nr. of hours worked</th><th spry:sort="costperhour">Cost per hour.</th></tr>{function::init_hours}<tr spry:repeat="dsProjects" onclick="chooseProject({ds_RowID})"><td>{id}</td><td>{NAME}</td><td>{hoursestimated}</td><td>{hoursworked}</td><td>{costperhour}</td></tr></table><br/>{function::get_hours}<br/>');
    I have tried to accomplish this in various ways but I don't succeed.
    I want to do it without refreshing the page.
    Update: I found some code here that I will try: Link
    Thanks in advance!
    Anders Branderud
    My blog

    Hello!
    Thanks!
    I don't succeed with the implementation in any browser.
    I have found a way to it, but I would like a way that updates the data quicker and without reloading all of the page. After all, I am only adding one row on the end of the data structure, so there should be no need to read in all data again.
    Now I do it like this:
    When a project is added, do this:
    1. Store a new row in the project file through a php script.
    2. When the post-call to the php-file returns, do refresh of the whole page.
    Then the newest version of the xml file will be read in.
    However, I don't want to read the data from a xml file each time that a new project is created.
    I know how to add the new data to a Spry-datastructure [in my code 'dsProjects'], but I don't know how to display the updated data without reloading the whole page.
    I have tried some various ways to do it, but haven't succeded.
    Thanks!
    Anders Branderud

  • TIPS(18) : CREATING SCRIPTS TO RECREATE A TABLE STRUCTURE

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(18) : Creating Scripts to Recreate a Table Structure
    =========================================================
    The script creates scripts that can be used to recreate a table structure.
    For example, this script can be used when a table has become fragmented or to
    get a defintion that can be run on another database.
    CREATES SCRIPT TO RECREATE A TABLE-STRUCTURE
    INCL. STORAGE, CONSTRAINTS, TRIGGERS ETC.
    This script creates scripts to recreate a table structure.
    Use the script to reorganise a table that has become fragmented,
    to get a definition that can be run on another database/schema or
    as a basis for altering the table structure (eg. drop a column!).
    IMPORTANT: Running the script is safe as it only creates two new scripts and
    does not do anything to your database! To get anything done you have to run the
    scripts created.
    The created scripts does the following:
    1. save the content of the table
    2. drop any foreign key constraints referencing the table
    3. drop the table
    4. creates the table with an Initial storage parameter that
    will accomodate the entire content of the table. The Next
    parameter is 25% of the initial.
    The storage parameters are picked from the following list:
    64K, 128K, 256K, 512K, multiples of 1M.
    5. create table and column comments
    6. fill the table with the original content
    7. create all the indexes incl storage parameters as above.
    8. add primary, unique key and check constraints.
    9. add foreign key constraints for the table and for referencing
    tables.
    10.Create the table's triggers.
    11.Compile any depending objects (cascading).
    12.Grant table and column privileges.
    13.Create synonyms.
    This script must be run as the owner of the table.
    If your table contains a LONG-column, use the COPY
    command in SQL*Plus to store/restore the data.
    USAGE
    from SQL*Plus:
    start reorgtb
    This will create the scripts REORGS1.SQL and REORGS2.SQL
    REORGS1.SQL contains code to save the current content of the table.
    REORGS2.SQL contains code to rebuild the table structure.
    undef tab;
    set echo off
    column a1 new_val stor
    column b1 new_val nxt
    select
    decode(sign(1024-sum(bytes)/1024),-1,to_char((round(sum(bytes)/(1024*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/1024), -1,'1M',
    decode(sign(256-sum(bytes)/1024), -1,'512K',
    decode(sign(128-sum(bytes)/1024), -1,'256K',
    decode(sign(64-sum(bytes)/1024) , -1,'128K',
    '64K'
    a1,
    decode(sign(1024-sum(bytes)/4096),-1,to_char((round(sum(bytes)/(4096*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/4096), -1,'1M',
    decode(sign(256-sum(bytes)/4096), -1,'512K',
    decode(sign(128-sum(bytes)/4096), -1,'256K',
    decode(sign(64-sum(bytes)/4096) , -1,'128K',
    '64K'
    b1
    from user_extents
    where segment_name=upper('&1');
    set pages 0 feed off verify off lines 150
    col c1 format a80
    spool reorgs1.sql
    PROMPT drop table bk_&1
    prompt /
    PROMPT create table bk_&1 storage (initial &stor) as select * from &1
    prompt /
    spool off
    spool reorgs2.sql
    PROMPT spool reorgs2
    select 'alter table '||table_name||' drop constraint
    '||constraint_name||';'
    from user_constraints where r_constraint_name
    in (select constraint_name from user_constraints where
    table_name=upper('&1')
    and constraint_type in ('P','U'));
    PROMPT drop table &1
    prompt /
    prompt create table &1
    select decode(column_id,1,'(',',')
    ||rpad(column_name,40)
    ||decode(data_type,'DATE' ,'DATE '
    ,'LONG' ,'LONG '
    ,'LONG RAW','LONG RAW '
    ,'RAW' ,'RAW '
    ,'CHAR' ,'CHAR '
    ,'VARCHAR' ,'VARCHAR '
    ,'VARCHAR2','VARCHAR2 '
    ,'NUMBER' ,'NUMBER '
    ,'unknown')
    ||rpad(
    decode(data_type,'DATE' ,null
    ,'LONG' ,null
    ,'LONG RAW',null
    ,'RAW' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'CHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR2',decode(data_length,null,null
    ,'('||data_length||')')
    ,'NUMBER' ,decode(data_precision,null,' '
    ,'('||data_precision||
    decode(data_scale,null,null
    ,','||data_scale)||')')
    ,'unknown'),8,' ')
    ||decode(nullable,'Y','NULL','NOT NULL') c1
    from user_tab_columns
    where table_name = upper('&1')
    order by column_id
    prompt )
    select 'pctfree '||t.pct_free c1
    ,'pctused '||t.pct_used c1
    ,'initrans '||t.ini_trans c1
    ,'maxtrans '||t.max_trans c1
    ,'tablespace '||s.tablespace_name c1
    ,'storage (initial '||'&stor' c1
    ,' next '||'&stor' c1
    ,' minextents '||t.min_extents c1
    ,' maxextents '||t.max_extents c1
    ,' pctincrease '||t.pct_increase||')' c1
    from user_Segments s, user_tables t
    where s.segment_name = upper('&1') and
    t.table_name = upper('&1')
    and s.segment_type = 'TABLE'
    prompt /
    select 'comment on table &1 is '''||comments||''';' c1 from
    user_tab_comments
    where table_name=upper('&1');
    select 'comment on column &1..'||column_name||
    ' is '''||comments||''';' c1 from user_col_comments
    where table_name=upper('&1');
    prompt insert into &1 select * from bk_&1
    prompt /
    set serveroutput on
    declare
    cursor c1 is select index_name,decode(uniqueness,'UNIQUE','UNIQUE')
    unq
    from user_indexes where
    table_name = upper('&1');
    indname varchar2(50);
    cursor c2 is select
    decode(column_position,1,'(',',')||rpad(column_name,40) cl
    from user_ind_columns where table_name = upper('&1') and
    index_name = indname
    order by column_position;
    l1 varchar2(100);
    l2 varchar2(100);
    l3 varchar2(100);
    l4 varchar2(100);
    l5 varchar2(100);
    l6 varchar2(100);
    l7 varchar2(100);
    l8 varchar2(100);
    l9 varchar2(100);
    begin
    dbms_output.enable(100000);
    for c in c1 loop
    dbms_output.put_line('create '||c.unq||' index '||c.index_name||' on
    &1');
    indname := c.index_name;
    for q in c2 loop
    dbms_output.put_line(q.cl);
    end loop;
    dbms_output.put_line(')');
    select 'pctfree '||i.pct_free ,
    'initrans '||i.ini_trans ,
    'maxtrans '||i.max_trans ,
    'tablespace '||i.tablespace_name ,
    'storage (initial '||
    decode(sign(1024-sum(e.bytes)/1024),-1,
    to_char((round(sum(e.bytes)/(1024*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/1024), -1,'1M',
    decode(sign(256-sum(e.bytes)/1024), -1,'512K',
    decode(sign(128-sum(e.bytes)/1024), -1,'256K',
    decode(sign(64-sum(e.bytes)/1024) , -1,'128K',
    '64K'))))) ,
    ' next '||
    decode(sign(1024-sum(e.bytes)/4096),-1,
    to_char((round(sum(e.bytes)/(4096*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/4096), -1,'1M',
    decode(sign(256-sum(e.bytes)/4096), -1,'512K',
    decode(sign(128-sum(e.bytes)/4096), -1,'256K',
    decode(sign(64-sum(e.bytes)/4096) , -1,'128K',
    '64K'))))) ,
    ' minextents '||s.min_extents ,
    ' maxextents '||s.max_extents ,
    ' pctincrease '||s.pct_increase||')'
    into l1,l2,l3,l4,l5,l6,l7,l8,l9
    from user_extents e,user_segments s, user_indexes i
    where s.segment_name = c.index_name
    and s.segment_type = 'INDEX'
    and i.index_name = c.index_name
    and e.segment_name=s.segment_name
    group by s.min_extents,s.max_extents,s.pct_increase,
    i.pct_free,i.ini_trans,i.max_trans,i.tablespace_name ;
    dbms_output.put_line(l1);
    dbms_output.put_line(l2);
    dbms_output.put_line(l3);
    dbms_output.put_line(l4);
    dbms_output.put_line(l5);
    dbms_output.put_line(l6);
    dbms_output.put_line(l7);
    dbms_output.put_line(l8);
    dbms_output.put_line(l9);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select constraint_name, decode(constraint_type,'U',' UNIQUE',' PRIMARY
    KEY') typ,
    decode(status,'DISABLED','DISABLE',' ') status from user_constraints
    where table_name = upper('&1')
    and constraint_type in ('U','P');
    cname varchar2(100);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) coln
    from user_cons_columns
    where table_name = upper('&1')
    and constraint_name = cname
    order by position;
    begin
    for q1 in c1 loop
    cname := q1.constraint_name;
    dbms_output.put_line('alter table &1');
    dbms_output.put_line('add constraint '||cname||q1.typ);
    for q2 in c2 loop
    dbms_output.put_line(q2.coln);
    end loop;
    dbms_output.put_line(')' ||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    c.table_name = upper('&1')
    union
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    r.table_name = upper('&1');
    cname varchar2(50);
    cname2 varchar2(50);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) colname
    from user_cons_columns
    where constraint_name = cname
    order by position;
    cursor c3 is
    select decode(position,1,'(',',')||rpad(column_name,40) refcol
    from user_cons_columns
    where constraint_name = cname2
    order by position;
    begin
    dbms_output.enable(100000);
    for q1 in c1 loop
    cname := q1.constraint_name;
    cname2 := q1.cname2;
    dbms_output.put_line('alter table '||q1.table1||' add constraint ');
    dbms_output.put_line(cname||' foreign key');
    for q2 in c2 loop
    dbms_output.put_line(q2.colname);
    end loop;
    dbms_output.put_line(') references '||q1.table2);
    for q3 in c3 loop
    dbms_output.put_line(q3.refcol);
    end loop;
    dbms_output.put_line(') '||q1.delete_rule||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    col c1 format a79 word_wrap
    set long 32000
    set arraysize 1
    select 'create or replace trigger ' c1,
    description c1,
    'WHEN ('||when_clause||')' c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is not null
    select 'create or replace trigger ' c1,
    description c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is null
    select 'alter trigger '||trigger_name||decode(status,'DISABLED','
    DISABLE',' ENABLE')
    from user_Triggers where table_name='&1';
    set serveroutput on
    declare
    cursor c1 is
    select 'alter table
    '||'&1'||decode(substr(constraint_name,1,4),'SYS_',' ',
    ' add constraint ') a1,
    decode(substr(constraint_name,1,4),'SYS_','
    ',constraint_name)||' check (' a2,
    search_condition a3,
    ') '||decode(status,'DISABLED','DISABLE','') a4,
    '/' a5
    from user_constraints
    where table_name = upper('&1') and
    constraint_type='C';
    b1 varchar2(100);
    b2 varchar2(100);
    b3 varchar2(32000);
    b4 varchar2(100);
    b5 varchar2(100);
    fl number;
    begin
    open c1;
    loop
    fetch c1 into b1,b2,b3,b4,b5;
    exit when c1%NOTFOUND;
    select count(*) into fl from user_tab_columns where table_name =
    upper('&1') and
    upper(column_name)||' IS NOT NULL' = upper(b3);
    if fl = 0 then
    dbms_output.put_line(b1);
    dbms_output.put_line(b2);
    dbms_output.put_line(b3);
    dbms_output.put_line(b4);
    dbms_output.put_line(b5);
    end if;
    end loop;
    end;
    create or replace procedure dumzxcvreorg_dep(nam varchar2,typ
    varchar2) as
    cursor cur is
    select type,decode(type,'PACKAGE BODY','PACKAGE',type) type1,
    name from user_dependencies
    where referenced_name=upper(nam) and referenced_type=upper(typ);
    begin
    dbms_output.enable(500000);
    for c in cur loop
    dbms_output.put_line('alter '||c.type1||' '||c.name||' compile;');
    dumzxcvreorg_dep(c.name,c.type);
    end loop;
    end;
    exec dumzxcvreorg_dep('&1','TABLE');
    drop procedure dumzxcvreorg_Dep;
    select 'grant '||privilege||' on '||table_name||' to '||grantee||
    decode(grantable,'YES',' with grant option;',';') from
    user_tab_privs where table_name = upper('&1');
    select 'grant '||privilege||' ('||column_name||') on &1 to
    '||grantee||
    decode(grantable,'YES',' with grant option;',';')
    from user_col_privs where grantor=user and
    table_name=upper('&1')
    order by grantee, privilege;
    select 'create synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from user_synonyms where table_name=upper('&1');
    PROMPT REM
    PROMPT REM YOU MAY HAVE TO LOG ON AS SYSTEM TO BE
    PROMPT REM ABLE TO CREATE ANY OF THE PUBLIC SYNONYMS!
    PROMPT REM
    select 'create public synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from all_synonyms where owner='PUBLIC' and table_name=upper('&1') and
    table_owner=user;
    prompt spool off
    spool off
    set echo on feed on verify on
    The scripts REORGS1.SQL and REORGS2.SQL have been
    created. Alter these script as necesarry.
    To recreate the table-structure, first run REORGS1.SQL.
    This script saves the content of your table in a table
    called bk_.
    If this script runs successfully run REORGS2.SQL.
    The result is spooled to REORGTB.LST.
    Check this file before dropping the bk_ table.
    */

    Please do NOT cross-postings: create a deep structure for dynamic internal table
    Regards
      Uwe

  • Help on triggers needed-update other tables

    Hi,
    I am using 10g and is very new to triggers and I hope I can gain some advises here.
    I have the following 3 tables. MainInterfaceTable is a table where it stores records of values which are to be updated to tables: log1 and log2 respectively. One application will insert record into MainInterfaceTable and the inserted record contains only values for columns which are to be updated into tables: log1 and log2 respectively. Columns which contain null values are not to be updated into log1 and log2 tables.
    I can only think of using many "if" statements in my trigger to concatenate the UPDATE DML to update log1 and log2 tables. But if the MainInterfaceTable table contains many columns, it is not very efficient. {color:#800080}Is there any built in oracle functions or a more efficient to perform this task??{color}
    {color:#800080}Any advises are greaatly appreciated. Thanks{color}
    For E.g. In the below MainInterfaceTable record, I only update table log1 with txt1A column values. And update log2 table with col1 and col2B column values.
    Column Values
    txt1 null
    txt1A 6
    txt1B null
    col1 &lsquo;new orders'
    col2A null
    col2B &lsquo;new purchase'
    ------------------------------my trigger -------------------------------------
    CREATE TRIGGER TRG_MainInterfaceTable
    AFTER INSERT ON MainInterfaceTable
    FOR EACH ROW
    DECLARE
    sqlStmt VARCHAR2(2000); -- the SQL statement
    BEGIN
    sqlStmt := 'UPDATE log1 a SET 1=1 ';
    if :*new*.txt1 is not null then
    sqlStmt := sqlStmt || ' ,a.txt1 = ' || :*new*.txt1;
    END IF
    if :*new*.txt1A is not null then
    sqlStmt := sqlStmt || ' ,a.txt1A = ' || :*new*.txt1A;
    END IF
    if :*new*.txt1B is not null then
    sqlStmt := sqlStmt || ' ,a.txt1B = ' || :*new*.txt1B;
    END IF
    prc_run_update_sql_log1(sqlStmt);
    ------repeat more IF THEN for other tables
    EXCEPTION
    WHEN
    -- exception handling
    end TRG_MainInterfaceTable
    --------------------------------------Table Structure------------------------------------------------------------------
    create table MainInterfaceTable (
    statuscol char(1),
    txt1 varchar2(20),
    txt1A number(6),
    txt1B varchar2(20),
    col1 varchar2(20),
    col2A number(6),
    col2B varchar2(20),
    create table log1 (
    txt1 varchar2(20),
    txt1A number(6),
    txt1B varchar2(20),
    create table log2 (
    col1 varchar2(20),
    col2A number(6),
    col2B varchar2(20),

    Thanks. I put the IF ELSE.. into a function and my codes looks neater. However I encounter a error when i try to pass in a DATE value.
    ORA_06502 numeric or value error: host bind array too small
    The error occur at the line in bold .
    I try to run
    Select TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI') from dual
    in PL/SQL screen and it works.
    Why the same TO_CHAR() syntax doesn't work in a function????
    FUNCTION concatupdatequery(pVal IN DATE, pCol IN VARCHAR2, pSql IN VARCHAR2) RETURN VARCHAR2 IS
    lvQueryStr VARCHAR2(30000);
    lvTempDate VARCHAR2(100);
    BEGIN
    lvQueryStr := pSql;
    IF pVal IS NOT NULL THEN
    dbms_output.put_line('pVal = ' || pVal);
    lvTempDate := TO_CHAR(pVal, 'DD-MON-YYYY HH24:MI:SS');
    lvQueryStr:=pSql||','||pCol||'=TO_DATE('''||lvTempDate||''',''DD-MON-YYYY HH24:MI'')'; -- DATE data type
    dbms_output.put_line('lvTempDate = ' || lvTempDate);
    END IF;
    RETURN lvQueryStr;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('concatupdatequery (DATE) :pCol:'||pCol||' ,pVal:'||pVal||' ,pSql:'||pSql);
    dbms_output.put_line(SQLCODE||' - '||SQLERRM);
    RAISE;
    END concatupdatequery;

Maybe you are looking for

  • Fields iout of Order from form submission

    When I get the return email the fields results or not in order. I am not sure what doing wrong. I looked at th help files for AS3 and found something about Array.sort() I am just not sure how to get it into my code correctly. Am I on the right track?

  • Sync deleted all of my contacts, how can I get them back?

    I recently got an iPhone 4s. I synced it to iTunes for the first time to transfer all the music and apps from my iPod touch to my iPhone. In the process all of my contacts, messages, and notes were deleted. I checked for a backup but there hasn't bee

  • Reliability of iPhoto 6 ?

    Hi, I've been using iView Media for months now, since I encountered some performance issues with iPhoto 5 and photo imported from some Nikon camera. Now I would like to move back to iPhoto 5 before upgrading to iPhoto 6, unfortunately I know no other

  • All my music is gone from my ipod touch. how do I get it back

    Can anyone help please. All my music disappeared from my ipod. How can I get it back?

  • Handling Unit number range HU_VEKP

    Hi Folks, I have a requirement related to Handling Unit number ranges. I need to merge two systems ABC & 123, during the migration process I found number range conflict for Handling Unit process. In packaging material type (0002) functionality the nu