How can i creat a trigger    error  invalid trigger specification

i have a stored procedure which i want it to be triggered when an insertion is done on table A
and that stored procedure accepts values from the insertion performed in table A
and inserts into Table B by either updating the table or insertion into Table B
how can i achieve this
OK fine i have a table called Table A
i want a trigger that can accept values such as
create or replace trigger UpdateMyDoc  after insert on  Table A
for each row
accoutntno varchar2,
ID varchar2
As
cnt number;
Begin
update Table B value (accoutntno ,ID ); commit;
end ;
is the above possible if it is then i get this  [1]: (Error): ORA-04079: invalid trigger specification
any help
Edited by: kama021 on Aug 13, 2009 2:24 AM

Stop right there, Kama.
update Table B value (accoutntno ,ID ); commit;Do not go any further on triggers, until you at least know how to write an UPDATE
Or is it INSERT
Once you have that in place, carry on by reading a bit about Transactions
Regards
Peter

Similar Messages

  • How Can i create a trigger

    Hi Every1,
    I want to create a database trigger which act on entering the charahters and count the characters.
    e.g
    you can understand with the example
    if i press 01 in a specific column the length of characters is two after this automatically the character sign i.e. / ( forward slash ) appers and then i can write 03 again the month and then again automatically / slash appers and i press 2009 and then go on
    then the filed will look likes 01/03/2009
    simply i dont want to press the / sign in the date fileld or place sign after ENTER through format mask property.
    can any1 please help me
    Regards
    M. Laeeque A.

    Hi,
    Sorry, I'm not getting you. For entering dates you don't have to enter / is you put the appropiate mask.
    Example:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> create table test_date(col date);
    Table created
    SQL> insert into test_date values(to_date('01032009', 'DDMMYYYY'));
    1 row inserted
    SQL> COMMIT;
    Commit complete
    SQL> select * from test_date;
    COL
    01/03/2009
    SQL>Regards,

  • How can I create my own error log in sql

    I would like to create an error log table in sql where every time there is an error in sql and every time a stored procedure rolls back it should submit an entry into the error table to show where and what the error was.
    Thank you
    Debra has a question

    I think SQL Server does a fairly good job of creating, writing to, and reading from it's own built-in error log.  please see this link for details.
    http://sqlandme.com/2012/01/25/sql-server-reading-errorlog-with-xp_readerrorlog/
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How can you create a drop down list of specific numbers that are in scientific notation?

    Is the best way to do this by constructing an enum and setting the
    individual values to a case structure which has constants that are the
    desired values... or is there a more straightforward way of doing this?

    Just use a menu ring and set the desired "Strings and values" using a property node (or, if they are static, by editing the items directly via the property dialog).
    Most likely, you also want to set the representation to DBL. 
    LabVIEW Champion . Do more with less code and in less time .

  • Crystal Server 2013: How to troubleshoot "Can not create temp file---- Error code:-2147215357"

    We have a Java7 web app, which generate PDF report by calling Crystal Server 2013 SP4.
    The app is being deployed on many different servers. We sometimes got the error below when generating report:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Can not create temp file---- Error code:-2147215357 [CRSDK00000615] Error code name:internal
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.controllerExportInternal(PrintOutputController.java:280)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:152)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:130)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:113)
    Problem is, this seems to be  a pretty generic exception. It could be caused by many different reasons.
    e.g. network connection problem, wrong DB login, wrong folder path, lack of folder access right, etc.
    Each time we could only guess what's wrong.
    We are running into it again, and this time everything seems correctly configured so far.
    We wonder if there are more info we can get to troubleshoot? For example, any log file of Crystal Server we should look into? Or does Crystal Server has debug mode which prints more details to tell us what goes wrong?

    Prithviraj Shekhawat wrote:
    Hi Henry,
    I believe you are using RAS SDKs to export the reports to PDF.
    Apply trace on RAS server and check what you find in RAS logs.
    Check whether you can see timeout error is RAS logs. Usually if connection is lost and the RAS server no more have the session to write to the temp directory, we do see these errors.
    Also, does the account that runs RAS have permissions to create a file in RAS's default temp directory? Are you getting any out of memory or out of disk space exceptions on App server or RAS, tracing RAS server is the way to move forward.
    Thanks,
    Prithvi
    >>I believe you are using RAS SDKs to export the reports to PDF.
    Yes
    >>Apply trace on RAS server and check what you find in RAS logs.
    >>Check whether you can see timeout error is RAS logs.
    How to configure tracing, and where are RAS logs? Is it configured in CMC --> Servers --> Crystal Report Services?
    >>Also, does the account that runs RAS have permissions to create
    >>a file in RAS's default temp directory?
    Pretty sure yes.
    >> Are you getting any out of memory or out of disk space exceptions
    >>on App server or RAS, tracing RAS server is the way to move forward.
    Not on App server.
    For RAS, that's the problem, I am not sure where to look.......

  • How can I create a pdf-report in a database trigger

    Hi,
    how can I create a pdf-file with Reports 9i in a database trigger ?
    Where can I find informations about it?
    Thanks
    Friedhold

    Here would be the place to start.
    If you have existing reports to call, take a look at the JRC

  • How can we create the error log in a ABAP program

    Hi all,
    How can we create the error log in a ABAP program
    Thanks,
    srinivas.

    Hi,
    Refer to FM's in the Function Group SBAL. For a change most of the FM's have been well documented. Also have a look at the DEMO pgms. Se38---->SBALDEMO & F4.
    Regards
    Raju Chitale

  • How can i create datasource on apache server for ADF application?

    Hi All,
    i my use case i have created simple adf application using ADF BC and want to deploy on Apache server 6.x.
    So my question is that  how can i create Data Source i have goggling and find  two different way to do this.
    1. write following line of code on apache server conf/Context.xml file.
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource"
                   driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"/>
    but when i have used this way i got following exception.
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    check link-
    https://forums.oracle.com/thread/2564233
    2. write following line of code apache conf/Server.xml file
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/TestDB" auth="Container"
                  type="oracle.jdbc.pool.OracleDataSource"
                  description="User database that can be updated and saved"
                  driverClassName="oracle.jdbc.driver.OracleDriver"
                  factory="oracle.jdbc.pool.OracleDataSourceFactory"
                  url="jdbc:oracle:thin:@//172.31.43.207:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"   />
      </GlobalNamingResources>
    and add this line in context.xml file inside <context> tag
    <ResourceLink global="jdbc/TestDB" name="jdbc/TestDB" type="oracle.jdbc.pool.OracleDataSource"/>
    but when i have run application i have got following error
    log-
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: invalid arguments in call"
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:298)
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:181)
      at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:110)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:63)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Thread.java:662)
    Aug 2, 2013 5:17:21 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: invalid arguments in call"
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:298)
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:181)
      at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:110)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:63)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Thread.java:662)
    so what is the solution how to create datasource on apche server which suitable for adf application?
    when i test data source using  following code used 1. way as i mentioned above  its running fine bt not for second.
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/TestDB">
    select empname from pay_emphdr where empcd='JK1306'
    </sql:query>
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
      <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
        Foo ${row.empname}<br/>
    </c:forEach>
      </body>
    </html>
    please help me. it is very urgent.
    thanks in Advance
    Manish

    Hi Lindalnci
    i have already tried  this tutorial and in my post i have defined first way to do using this procedure.
    in that case i have got following exception as i have mentioned above
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

  • How can I create an element in the model node?

    Hi, Experts,
    I create a model node that name is containerNode in the contxt. Cadinility is: 1..n
    I write the code in the method:
      private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){
           String betrgSumStr = "";
         int index = 0;
         Vector containerVector = new Vector();
         int size = wageTypePayslip.size();
         IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.
         BigDecimal betrgSum = new BigDecimal( 0 );
    I try to create a element in the containerNode, But the system report error when I run the application.
    java.lang.IllegalArgumentException: model object must not be null
         at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)
         at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)
         at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)
         at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)
         at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)
         at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)
         at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
    How can I create an element in the model node ?
    Best regards,
    tao

    Hi,
    You need to execute the model before creating the element.
    Regards
    Ayyapparaj

  • How can I create a object for a note?

    Hi experts,
        I need to apply the note 501905 but when I try in the SNOTE transacction I receive this error:
    Object REPS Z_MRM_DELETE_PP does not exist; create it
    Diagnosis
    The SAP Note that you want to implement contains changes to an object that does not yet exist in your system.
    SAP Notes contain only changes to objects that already exist. This means that the the system cannot automatically create new objects during the implementation of this SAP Note.
    Procedure
    1. Cancel the SAP Note implementationl.
    2. Create an empty object REPS Z_MRM_DELETE_PP with the corresponding object editor.
    3. Restart the SAP Note implementation.
    How can I create that Object??
    Thanks for the help!

    Hi Carlos,
    It says that you have to create a new program with a name Z_MRM_DELETE_PP.
    Once you create and activate the program you can execute the SAP Note.
    All this processure will be written in the SAP Note.
    Please Go through the Note using below:
    Step1: Use T.code SNOTE.
    Step2: Use menu GOTO --> NOTE BROWSER. Provide the Note no and EXECUTE.
    Step3: Double click on the displayed line.
    Here you will get the information to do before implementing the note.
    Go through all the documentation, and once you did all the development given in the note then you can implement the note.
    Regards,
    Sreekanth.

  • How can you create a spry menu bar with no background colour?

    How can you create the first level of a spry menu bar to have no colour? I have a coloured background right now and the colour matches when you load the site in Internet explorer but does not match in Firefox. Any suggestions are welcomed on how to fix this.
    Thanks!
    HK

    Here is the site:
    http://partnersnaturally.ca/
    I am learning with code, (obviously) so any feedback would be nice. I use dreamweaver CS4, but when I originally designed the site it was in a much older version of dreamweaver. I wonder if that could also be a cause. (besides human error)
    Thanks again,
    HK

  • How can i create a SP transaction to make Dimension1 Mandatory

    Hi All
    How can i create a SP transaction to make Dimension1 Mandatory
    Best regards
    Rashid

    Dear Rashid,
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(25),                     -- SBO Object Type
    @transaction_type nchar(1),     -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200) -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    IF (@object_type = '30' AND @transaction_type= 'A')
    BEGIN
    IF EXISTS (SELECT DocEntry FROM [dbo].[JDT1] WHERE (ProfitCode IS NULL OR ProfitCode = '') AND DocEntry = @list_of_cols_val_tab_del)
    BEGIN
    SELECT @error =1, @error_message = 'Profit Center cannot be blank -Enter Plant Code'
    END
    END
    select @error, @error_message
    END
    Jeyakanthan

  • How can i write the trigger for Global Temporary Table

    Hi Grus,
    How can i write the trigger for Global Temporary Table.
    I was created the GTT with trigger using the below script .
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    trigger was create successfully, but the wouldn't insert into to EMPNAME Table..
    Please guide whether am correct or not? if not kindly give a correct syntax with example
    Thanks in Advance,
    Arun M M

    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    you are referencing old value in insert stmt.
    BEGIN
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    END;then run ur application it works fine...
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    dbms_output.put_line(:OLD.EMP_C_NAME||'yahoo');
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    dbms_output.put_line(:OLD.EMP_C_NAME);
    END;
    create table EMPNAME as select * from GLOBAL_TEMP where 1=2
    insert into GLOBAL_TEMP values('fgfdgd');
    commit;
    select * from GLOBAL_TEMP;
    select * from EMPNAME;
    output:
    1 rows inserted
    commit succeeded.
    EMP_C_NAME          
    fgfdgd              
    1 rows selected
    EMP_C_NAME          
    fgfdgd              
    1 rows selectedgot it Arun
    Edited by: OraclePLSQL on Dec 28, 2010 6:07 PM

  • How can we create a table with more than 64 fields in the default DB?

    Dear sirs,
    I am taking part in the process of migrating a J2ee application from JBoss to SAP Server. I have imported the ejb project.
    I have an entity bean with 79 CMP fields. i have created the bean and created the table for the same also. but when i tried to build the dictionary, i am getting an error message as given below,
    "Dictionary Generation: DB2:checkNumberOfColumns (primary key of table IMP_MANDANT): number of columns (79) greater than allowed maximum (64) IMP_MANDANT.dtdbtable MyAtlasDictionary/src/packages"
    Is it mean that we can not create tables with fields more than 64?
    How can i create tables with more than 64 fields?
    Kindly help,
    Thankyou,
    Sudheesh...

    Hi,
      I found a link in the help site which says its 1024 (without key 1023).
    http://help.sap.com/saphelp_nw04s/helpdata/en/f6/069940ccd42a54e10000000a1550b0/content.htm
      Not sure about any limit of 64 columns.
    Regards,
    S.Divakar

  • MRRL : How can we create Credit Memo for these Invoices

    Hi Gurus,
    How can we create Crerdit memo in case when the Invoice has been posted thru MRRL?
    Is there any way the we can do Subsequent Credit / debit for the ERS vendor (posted by MRRL) as well?
    Thanks in advance
    Shashidhar

    Hello
    How can we reverse fi document created through MRRL transaction.
    FI document cannot be reversed reason being -Error-Invoice doc. 5105692828/2009 was created via evaluated receipt settlement.
    GR material document cannot reversed reason being-Error-Deficit of PU IR quantity 1,456.000 CS
    Not possible even to return the delivery to Vendor , Movement type 122
    Thanks
    Dinabandhu

Maybe you are looking for