Compilation errors on SELECT stmt

When compiling a script I keep getting the following errors:
LINE/COL ERROR
23/3     PL/SQL: SQL Statement ignored
24/4     PL/SQL: ORA-00933: SQL command not properly endedSnippet of the code affected:
     BEGIN
          SELECT table.* FROM table
               INTO tuple
               WHERE table.pk=se_id;Being that tuple is defined as
tuple Table%ROWTYPE;What's causing the error I'm getting?

sql >> DECLARE
2 --
3 tuple Table1%ROWTYPE;
4 --
5 se_id number := 1 ;
6 --
7 BEGIN
8 --
9 SELECT table1.*
10 INTO tuple
11 FROM table1
12 WHERE table1.pk=se_id;
13 --
14 dbms_output.put_line('tuple: '||tuple.pk);
15 --
16 END ;
17 /
tuple: 1
PL/SQL procedure successfully completed.

Similar Messages

  • Error  with select stmt.

    Hi All,
    I am getting this error , can you please tell me what I am doing wrong with the select stmt.
    SELECT AFKDAT ANETWR B~KZWI1
                         FROM VBRK AS A INNER JOIN VBRP AS B ON
                              AVBELN = BVBELN
                              INTO (IOUT-FKDAT, IOUT-NETWR, IOUT-KZWI1)
                              WHERE B~VBELN = IOUT-VBELV
                              AND   B~POSNR = ISDOC-POSNR.
    Incorrect nesting: Before the statement "ENDIF", the structure          
    introduced by "SELECT" must be concluded by "ENDSELECT". -
    Thanks
    Veni.

    Hi All,
    I tried INTO CORRESPONDING FIELDS OF IOUT
    but with this also same error is comming. I am sending part of code.
    Please help me.
    Thanks
    Veni.
    TABLES: VBAK, VBAP, KNA1, VBRK, VBRP, VBFA.
    DATA: BEGIN OF ISDOC OCCURS 0,
            VBELN LIKE VBAK-VBELN,
            POSNR LIKE VBAP-POSNR,
            KUNNR LIKE VBAK-KUNNR,
            ERDAT LIKE VBAK-ERDAT,
            BSTNK LIKE VBAK-BSTNK,
            MATNR LIKE VBAP-MATNR,
            ARKTX LIKE VBAP-ARKTX.
    DATA: END OF ISDOC.
    DATA: BEGIN OF IOUT OCCURS 0,
            VBELN LIKE VBAK-VBELN,
            POSNR LIKE VBAP-POSNR,
            KUNNR LIKE VBAK-KUNNR,
            NAME1 LIKE KNA1-NAME1,
            ERDAT LIKE VBAK-ERDAT,
            BSTNK LIKE VBAK-BSTNK,       
            MATNR LIKE VBAP-MATNR,
            ARKTX LIKE VBAP-ARKTX,
            VBELV LIKE VBRP-VBELN,
            FKDAT LIKE VBRK-FKDAT,
            NETWR LIKE VBRK-NETWR,
            KZWI1 LIKE VBRP-KZWI1.
    DATA: END OF IOUT.
    FORM getdata.
      SELECT A~VBELN B~POSNR A~KUNNR A~ERDAT A~BSTNK B~MATNR B~ARKTX
             FROM VBAK AS A INNER JOIN VBAP AS B ON A~VBELN = B~VBELN
             INTO TABLE ISDOC
             WHERE A~AUART IN SAUART
             AND A~ERDAT IN SERDAT
             AND A~KUNNR IN SKUNNR.
               SORT ISDOC BY VBELN POSNR.
      LOOP AT ISDOC.
        MOVE-CORRESPONDING ISDOC TO IOUT.
        CLEAR: KNA1.
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = ISDOC-KUNNR.
        IF SY-SUBRC = 0.
          MOVE KNA1-NAME1 TO IOUT-NAME1.
        ENDIF.
        SELECT VBELN INTO IOUT-VBELV FROM VBFA WHERE VBELV = ISDOC-VBELN
                                               AND   POSNV = ISDOC-POSNR
                                               AND   VBTYP_N = 'O'.
          IF SY-SUBRC = 0.
            SELECT A~FKDAT A~NETWR B~KZWI1
                   FROM VBRK AS A INNER JOIN VBRP AS B ON A~VBELN = B~VBELN
                   INTO CORRESPONDING FIELDS OF IOUT
    *               (IOUT-FKDAT, IOUT-NETWR, IOUT-KZWI1)
                         WHERE B~VBELN = IOUT-VBELV
                         AND   B~POSNR = ISDOC-POSNR.
              APPEND IOUT.
              CLEAR IOUT.
            ENDIF.
          ENDLOOP.
        ENDFORM.                    " getdata

  • Why does plsql give compilation error for select statement?

    When I run following plsql program, it gives compilation error. Could somebody please point me out what could be wrong here? I am running it from system user.
    create or replace procedure drop_user_proc (iname in varchar2) is
    uname varchar2(100);
    begin
    select username into uname from dba_users where username = upper(iname);
    end drop_user_proc;
    select username from dba_users where username = upper('newuser');
    When I run it, I get following error. dba_users is there that is the reason it works outside plsql block, but it doesn't from inside block.
    SQL> @t4
    Warning: Procedure created with compilation errors.
    USERNAME
    NEWUSER
    SQL> show err
    Errors for PROCEDURE DROP_USER_PROC:
    LINE/COL ERROR
    4/3 PL/SQL: SQL Statement ignored
    4/35 PL/SQL: ORA-00942: table or view does not exist

    Role based grants are not available within the stored procedures.
    Only explicit grants are recognized when compiling stored code.
    You need to grant select on that table to the user where you are creating this procedure.

  • Query giving compilation error

    hi,
    i am confused that my query is working fine on back-end sqlplus, but as i put to use it in my form
    at pre-form to know count, it gives compilation error;
    sqlplus
    SELECT COUNT(*) M_CNT1
    FROM(
    SELECT POH_CODE||'-'||POH_NO CODE,NVL(POH_FREIGHT_lc_amount,0)
    -NVL((
    SELECT SUM(FTH_LC_AMOUNT)
       FROM FIN_TXN_HEADER
      WHERE FTH_REF_CODE = POH_CODE
        AND FTH_REF_NO = POH_NO
        AND FTH_ACNT_CODE = 'AC1009'
      GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET, POH_CODE, POH_NO
    FROM PURCHASE_ORDER_HEADEr
    WHERE NVL(POH_FREIGHT_LC_AMOUNT,0) > 0);
        M_CNT1
             1
    in pre-form
    declare
    m_cnt1 number;
    BEGIN
    SELECT COUNT(*) INTO M_CNT1
    FROM(
    SELECT NVL(POH_FREIGHT_lc_amount,0)
    -NVL((
    SELECT SUM(FTH_LC_AMOUNT)
       FROM FIN_TXN_HEADER
      WHERE FTH_REF_CODE = POH_CODE
        AND FTH_REF_NO = POH_NO
        AND FTH_ACNT_CODE = 'AC1009'
      GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET
    FROM PURCHASE_ORDER_HEADER
    WHERE NVL(POH_FREIGHT_LC_AMOUNT,0) > 0);
    END;return error;
    Error 103 at line 11, column 2
    Encountered the symbol "SELECT" when expecting on of the following:
    ( - + mod not null others<an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    cast<a string literal with character se specification>
    <a number> <a single-quoted SQL string>
    Error 103 at line 16, column 36
    Encountered the symbol "," when expecting on of the following:
    ) intersect minus union
    i think the problem is continuation line or single quote.
    what is it can anybody help me please? tyvm.

    >
    Error is in this line.
    Use : before M_CNT1hi Navneet,
    m_cnt1 is neither a db-or-a-non-db-block item.
    so how come i used : sign before m_cnt1.
    i guess the problem is below sonewhere may be,
    -NVL((
    SELECT SUM(FTH_LC_AMOUNT)       --- line 11
                         OR
      GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET    --line 16

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • File: e:\pt849-905-R1-retail\peopletools\SRC\PSRED\psred.cppSQL error. Stmt #: 1849  Error Position: 24  Return: 3106 - ORA-03106: fatal two-task communication protocol error   Failed SQL stmt:SELECT PROJECTNAME FROM PSPROJECTDEFN ORDER

    File:
    e:\pt849-905-R1-retail\peopletools\SRC\PSRED\psred.cppSQL error. Stmt #:
    1849  Error Position: 24  Return: 3106 - ORA-03106: fatal two-task
    communication protocol error
    Failed SQL stmt:SELECT PROJECTNAME FROM PSPROJECTDEFN ORDER
    BY PROJECTNAME
    Got this error when opening the peopletools application designer 8.49. The same is working fine within the server, but not working from the client's machine.
    We can still able to connect to the database & URL
    Please help by throwing some lights.
    Thanks,
    Sarathy K

    Looks like a SQL error. ARe you able to connect to the database with SQL*Plus ? Probably the Oracle client is badly configured.
    Nicolas.

  • Wierd SQL Select Compile Error

    Hello.
    When I do my SQL like this:
    SQL SELECT cus_surname as "Surname",
    cus_forename as
    "FirstName",
    cus_telephone as
    "Telephone",
    cus_address as
    "Address1",
    cus_line1 as
    "Address2",
    cus_line2 as
    "Address3",
    cus_town as
    "Address4",
    cus_city as
    "Address5",
    cus_postcode as
    "Address6"
    INTO :lCustomer
    FROM msp_customers
    WHERE cus_serial = :lRefCustomer.Serial
    on session SessionToUse;
    I get this compile error:
    The read-only virtual attribute
    FoundationClasses.FoundationBusinessObject.IsNew can't be passed as an
    OUTPUT or an INPUT OUTPUT parameter.
    Yet if I remove the "as" from the SQL Select syntax it works, with no
    compile errors.
    Why? I don't understand why they are different!
    Tim Sawyer
    PanCredit
    Leeds, UK.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I added a DBMS_OUTPUT.put_line(l_wrap) in keith codes
    and run out put wrapped test codes in sqlplus and can see wrapped test procedure.
    create or replace procedure test wrapped
    a000000
    b2
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    7
    11d 124
    ohyVALi7ang26ROCF0CZ3wLg6ngwgy7Q2SdqfC/p+D6E39xrRLEK0/eVVEVSORSTWoZXk1gi
    JT9nTrV3IXmGVbi5uMlIl+0C/WV9wPlFL5z37QfcEOYUdmLx8iwul2hEvDehUX0jLfiltHqx
    MhAgy16zDvWPfv5uE4HrlBvRAYoDmETXR7r10x/uyQyUxDw4sVyq6Ndh4GSFw9zp801nKSN1
    P0GOB03CtlcnrqAjQhASJKrP4sXW74oOyr373DBBP/CLndRTT0TZ1HvWVzAgL5C++Dl6PNyQ
    But I got compiled errors as
    Compilation errors for PROCEDURE SYS.TEST
    Error: PLS-00103: Encountered the symbol "ASWALLET_OPEN" when expecting one of the following:
    ( ; is with authid as cluster compress order using compiled
    wrapped external deterministic parallel_enable pipelined
    result_cache
    The symbol "is" was substituted for "ASWALLET_OPEN" to continue.
    Line: 1
    Text: create or replace procedure test wrapped
    Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
    constant exception <an identifier>
    <a double-quoted delimited-identifier> table long double ref
    char time timestamp interval date binary national character
    nchar
    The symbol "<an identifier>" was substituted for "=" to continue.
    Line: 1
    Text: create or replace procedure test wrapped
    Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
    constant exception <an identifier>
    <a double-quoted delimited-identifier> table long double ref
    char time timestamp interval date binary national character
    nchar
    Line: 1
    Text: create or replace procedure test wrapped
    .Bot trigger and procedure works well before wrapped.
    I use oracle 11g2 at window 2003.
    Thanks
    newdba

  • Compile Error: "schema 'name' does not exist

    Im trying to build a program that quereys a table in a database but i keep getting this error. Am i missing a link between the files or am i missing a line of code in my program??

    Apologies. I receive a compiler error which reads as follows;
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    java.sql.SQLSyntaxErrorException: Schema 'DEMO' does not exist
    Heres the main body of code i am trying to execute.
    public class Main {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    try{
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    }catch(ClassNotFoundException e){
    System.out.println(e);
    try{
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/SimpleDBDemo", "demo", "demo");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM DEMO.Table1");
    while (rs.next()) {
    String s = rs.getString("Name");
    float n = rs.getFloat("Age");
    System.out.println(s + " " + n);
    }catch(SQLException e){
    System.err.println(e);
    I am using NetBeans IDE and have created a database under: Services->Databases-> Java DB->SimpleDBDemo.
    I have a database connection in which theres a simple table (called "TABLE1") created which contains the names and ages of two people.
    Hope this makes the problem a bit clearer.
    Any help would be greatly appreciated.

  • Warning: Function created with compilation errors. ???

    I created a function with a warning:
    Warning: Function created with compilation errors.
    I'd like to know more detailed information about this warning, how to find them?
    If only with this warning, I don't know how to correct the definition of the function.
    BTW, because it is a warning, I just try to run the sql stmt which will call this function:
    SQL> select strdiff(ename, 'FOR') from emp;
    select strdiff(ename, 'FOR') from emp
    ERROR at line 1:
    ORA-06575: Package or function STRDIFF is in an invalid state.
    /* strdiff is the name of function */
    Thanks in advance!

    Hi,
    I think that your posting may be more suited to the PL/SQL forum.
    after the function is created with errors you should try the command:
    show err
    or
    show errors
    this should at least give you some idea of what is wrong.
    regards Michael

  • Need help determining compiling error

    Good morning,
    I need help finding the cause of a compiling error I receive. I have reviewed my code numerous times without any luck. I hope you guys might see something I am not! The entire file exceeds the limit I can post, so I am attaching it in 2 posts. Sorry for the inconvenience. The error and my code are posted below. Thank you for your help!
    C:\StockTrackerDB.java:382: cannot find symbol
    symbol : method add(java.lang.Boolean)
    location: class java.util.ArrayList<java.lang.String>
                   aList.add(new Boolean(rs.getBoolean("admin")));
    ^
    1 error
    Tool completed with exit code 1
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class StockTrackerDB
         private Connection con = null;
         //Constructor; makes database connection
         public StockTrackerDB() throws ClassNotFoundException,SQLException
              if(con == null)
                   String url = "jdbc:odbc:StockTracker";
                   try
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   catch(ClassNotFoundException ex)
                        throw new ClassNotFoundException(ex.getMessage() +
                                    "\nCannot locate sun.jdbc.odbc.JdbcOdbcDriver");
                   try
                        con = DriverManager.getConnection(url);
                   catch(SQLException ex)
                        throw new SQLException(ex.getMessage()+
                                    "\nCannot open database connection for "+url);
         // Close makes database connection; null reference to connection
         public void close() throws SQLException,IOException,ClassNotFoundException
              con.close();
              con = null;
         // Method to serialize object to byte array
         private byte[] serializeObj(Object obj) throws IOException
              ByteArrayOutputStream baOStream = new ByteArrayOutputStream();
              ObjectOutputStream objOStream = new ObjectOutputStream(baOStream);
              objOStream.writeObject(obj); // object must be Serializable
              objOStream.flush();
              objOStream.close();
              return baOStream.toByteArray(); // returns stream as byte array
         // Method to deserialize bytes from a byte array into an object
         private Object deserializeObj(byte[] buf) throws IOException, ClassNotFoundException
              Object obj = null;
              if(buf != null)
                   ObjectInputStream objIStream = new ObjectInputStream(new ByteArrayInputStream(buf));
                   obj = objIStream.readObject(); //IOException, ClassNotFoundException
              return obj;
         // Methods for adding a record to a table
         // add to the Stocks Table
         public void addStock(String stockSymbol, String stockDesc) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO Stocks VALUES ('"
                                    +stockSymbol+"'"
                                    +",'"+stockDesc+"')");
              stmt.close();
         // add to the Users table
         public boolean addUser(User user) throws SQLException,IOException,ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) == null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("INSERT INTO Users VALUES (?,?,?,?,?)");
                   pStmt.setString(1, dbUserID);
                   pStmt.setString(2, dbLastName);
                   pStmt.setString(3, dbFirstName);
                   pStmt.setBytes(4, serializeObj(pswd));
                   pStmt.setBoolean(5, isAdmin);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User exists - cannot add.");
              return result;
         // add to the UserStocks table
         public void addUserStocks(String userID, String stockSymbol)
                        throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO UserStocks VALUES ('"
                                    +userID+"'"
                                    +",'"+stockSymbol+"')");
              stmt.close();
         // Methods for updating a record in a table
         // updating the Users table
         public boolean updUser(User user) throws SQLException, IOException, ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) != null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("UPDATE Users SET lastName = ?," + " firstName = ?, pswd = ?, admin = ? WHERE userID = ?");
                   pStmt.setString(1, dbLastName);
                   pStmt.setString(2, dbFirstName);
                   pStmt.setBytes(3, serializeObj(pswd));
                   pStmt.setBoolean(4, isAdmin);
                   pStmt.setString(5, dbUserID);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User does not exist - cannot update.");
              return result;
         }

         // Methods for deleting a record from a table
         // delete a record from the Stocks table
         private void delStock(String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("DELETE FROM Stocks WHERE "
                                    +"symbol = '"+stockSymbol+"'");
              stmt.close();
         // delete a record from the Users table
         public void delUser(User user) throws SQLException,IOException,ClassNotFoundException
              String dbUserID;
              String stockSymbol;
              Statement stmt = con.createStatement();
              try
                   con.setAutoCommit(false);
                   dbUserID = user.getUserID();
                   if(getUser(dbUserID) != null) // verify user exists in database
                        ResultSet rs1 = stmt.executeQuery("SELECT userID, symbol "
                                              +"FROM UserStocks WHERE userID = '"+dbUserID+"'");
                        while(rs1.next())
                             try
                                  stockSymbol = rs1.getString("symbol");
                                  delUserStocks(dbUserID, stockSymbol);
                             catch(SQLException ex)
                                  throw new SQLException("Deletion of user stock holding failed: " +ex.getMessage());
                        } // end of loop thru UserStocks
                        try
                        {  // holdings deleted, now delete user
                             stmt.executeUpdate("DELETE FROM Users WHERE "
                                              +"userID = '"+dbUserID+"'");
                        catch(SQLException ex)
                             throw new SQLException("User deletion failed: "+ex.getMessage());
                   else
                        throw new IOException("User not found in database - cannot delete.");
                   try
                        con.commit();
                   catch(SQLException ex)
                        throw new SQLException("Transaction commit failed: "+ex.getMessage());
              catch (SQLException ex)
                   try
                        con.rollback();
                   catch (SQLException sqx)
                        throw new SQLException("Transaction failed then rollback failed: " +sqx.getMessage());
                   // Transaction failed, was rolled back
                   throw new SQLException("Transaction failed; was rolled back: " +ex.getMessage());
              stmt.close();
         // delete a record from the UserStocks table
         public void delUserStocks(String userID, String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              ResultSet rs;
              stmt.executeUpdate("DELETE FROM UserStocks WHERE "
                                    +"userID = '"+userID+"'"
                                    +"AND symbol = '"+stockSymbol+"'");
              rs = stmt.executeQuery("SELECT symbol FROM UserStocks "
                                         +"WHERE symbol = '"+stockSymbol+"'");
              if(!rs.next()) // no users have this stock
                   delStock(stockSymbol);
              stmt.close();
         // Methods for listing record data from a table
         // Ordered by:
         //          methods that obtain individual field(s),
         //          methods that obtain a complete record, and
         //          methods that obtain multiple records
         // Methods to access one or more individual fields
         // get a stock description from the Stocks table
         public String getStockDesc(String stockSymbol) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              String stockDesc = null;
              ResultSet rs = stmt.executeQuery("SELECT symbol, name FROM Stocks "
                                                      +"WHERE symbol = '"+stockSymbol+"'");
              if(rs.next())
                   stockDesc = rs.getString("name");
              rs.close();
              stmt.close();
              return stockDesc;
         // Methods to access a complete record
         // get User data from the Users table
         public User getUser(String userID) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              byte[] buf = null;
              User user = null;
              ResultSet rs = stmt.executeQuery("SELECT * FROM Users WHERE userID = '" +userID+"'");
              if(rs.next())
                   dbUserID = rs.getString("userID");
                   dbLastName = rs.getString("lastName");
                   dbFirstName = rs.getString("firstName");
                   // Do NOT use with JDK 1.2.2 using JDBC-ODBC bridge as
                   // SQL NULL data value is not handled correctly.
                   buf = rs.getBytes("pswd");
                   dbPswd=(Password)deserializeObj(buf);
                   isAdmin = rs.getBoolean("admin");
                   user = new User(dbUserID,dbFirstName,dbLastName,dbPswd,isAdmin);
              rs.close();
              stmt.close();
              return user; // User object created for userID
         // Methods to access a list of records
         // get a list of selected fields for all records from the Users Table
         public ArrayList listUsers() throws SQLException,IOException,ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT userID, firstName, lastName, admin "
                                                 +"FROM Users ORDER BY userID");
              while(rs.next())
                   aList.add(rs.getString("userID"));
                   aList.add(rs.getString("firstName"));
                   aList.add(rs.getString("lastName"));
                   aList.add(new Boolean(rs.getBoolean("admin")));
              rs.close();
              stmt.close();
              return aList;
         // get all fields in all records for a given user from the UserStocks table
         public ArrayList listUserStocks(String userID) throws SQLException, IOException, ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT * FROM UserStocks "
                                                      +"WHERE userID = '"+userID+"' ORDER BY symbol");
              while(rs.next())
                   aList.add(rs.getString("symbol"));
              rs.close();
              stmt.close();
              return aList;
    }

  • Experiencing "The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?)" compilation error

    I am just starting to implement a new user login authentication process wherein after prompting user for username & password, I hope to authenticate them againts our company Active Directory user data. Since I am just starting, I only have very few things
    done at this point which is how I wanted to work on this so that my development environment is still at its simplest state.
    I am using the following for development:
    MS-Visual Studios Professional 2013 Version 12.0.30501.00 Update 2, and
    MS .NET Framework Version 4.5.50938.
    Here are my project solution's current items:
    Web.config:
    <?xml version="1.0"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    </system.web>
    <system.webServer>
    <defaultDocument enabled="true">
    <files>
    <add value="Login.aspx" />
    </files>
    </defaultDocument>
    </system.webServer>
    </configuration>
    Web.Debug.config:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
    <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <!--
    In the example below, the "SetAttributes" transform will change the value of
    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
    finds an attribute "name" that has a value of "MyDB".
    <connectionStrings>
    <add name="MyDB"
    connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
    xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
    -->
    <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
    <!--
    In the example below, the "Replace" transform will replace the entire
    <customErrors> section of your web.config file.
    Note that because there is only one customErrors section under the
    <system.web> node, there is no need to use the "xdt:Locator" attribute.
    <customErrors defaultRedirect="GenericError.htm"
    mode="RemoteOnly" xdt:Transform="Replace">
    <error statusCode="500" redirect="InternalError.htm"/>
    </customErrors>
    -->
    </system.web>
    </configuration>
    Web.Assemblies.config:
    <?xml version="1.0"?>
    <configuration>
    <system.web>
    <compilation debug="false" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <assemblies>
    <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral PublicKeyToken=b03f5f7f11d50a3a"/>
    </assemblies>
    </system.web>
    </configuration>
    Login.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div id="loginForm" style="height: 562px; width: 399px; margin-left: 0px" title="Login Form">
    &nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginPageLabel" runat="server" Font-Bold="True" Font-Names="Arial Black" Font-Size="Large" Text="Please Log In"></asp:Label>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginUsernameLabel" runat="server" Text="Username:"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="loginUserNameTextBox" runat="server" OnTextChanged="loginUserNameTextBox_TextChanged" Width="213px" Wrap="False" AutoPostBack="True" TabIndex="1"></asp:TextBox>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginPasswordLabel" runat="server" Text="Password:"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="loginPasswordTextBox" runat="server" OnTextChanged="loginPasswordTextBox_TextChanged" Width="212px" Wrap="False" AutoPostBack="True" TabIndex="2"></asp:TextBox>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RadioButton ID="loginUAradioButton" runat="server" Font-Bold="True" OnCheckedChanged="loginUAradioButton_CheckedChanged" Text="TUPSS Associate" AutoPostBack="True" TabIndex="3" />
    &nbsp;&nbsp;
    <asp:RadioButton ID="loginAFradioButton" runat="server" Font-Bold="True" OnCheckedChanged="loginAFradioButton_CheckedChanged" Text="Area Franchisee" AutoPostBack="True" TabIndex="4" />
    <br />
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="loginSubmitButton" runat="server" Font-Bold="True" OnClick="loginSubmitButton_Click" Text="Log In" TabIndex="5" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="loginCancelButton" runat="server" Font-Bold="True" OnClick="loginCancelButton_Click" Text="Cancel" TabIndex="6" />
    <br />
    <br />
    &nbsp;&nbsp;
    <asp:Label ID="loginStatusInstructionLabel" runat="server" Text="Status/Instruction:"></asp:Label>
    <br />
    &nbsp;&nbsp;
    <asp:TextBox ID="loginStatusInstructionTextBox" runat="server" Height="230px" MaxLength="100" Rows="12" TextMode="MultiLine" Width="360px" EnableViewState="False" OnTextChanged="loginStatusInstructionTextBox_TextChanged" ReadOnly="True" TabIndex="-1"></asp:TextBox>
    </div>
    </form>
    </body>
    </html>
    Login.aspx.cs:
    using System;
    using System.DirectoryServices;
    public partial class Login : System.Web.UI.Page
    private string uName; // user-entered username
    private string pWord; // user-entered password
    private int loginLoadCycles; // just keeping track of how many times Page_Load is called
    protected void Page_Load(object sender, EventArgs e)
    if (this.loginUserNameTextBox.Text == String.Empty &&
    this.loginPasswordTextBox.Text == String.Empty &&
    this.loginUAradioButton.Checked == false &&
    this.loginAFradioButton.Checked == false)
    this.loginInit();
    this.setLoginVisibilityAndFocus();
    this.loginLoadCycles += 1;
    private void loginInit()
    this.uName = String.Empty;
    this.pWord = String.Empty;
    this.loginLoadCycles = 0;
    private void setLoginVisibilityAndFocus()
    // Decide on whether or not the Login submit & cancel buttons should be enabled or not
    if ( this.loginUserNameTextBox.Text == String.Empty ||
    (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == false) )
    this.loginSubmitButton.Enabled = false;
    this.loginCancelButton.Enabled = false;
    this.loginStatusInstructionTextBox.Text = "Please specify if you are a TUPSS Associate or an Area Franchisee by checking either the 'TUPSS Associate' or 'Area Franchisee' checkbox.";
    else
    this.loginSubmitButton.Enabled = true;
    this.loginCancelButton.Enabled = true;
    if (this.loginPasswordTextBox.Text == String.Empty)
    this.loginStatusInstructionTextBox.Text = "Now that you have entered your username & type, please enter your password.";
    else
    this.loginStatusInstructionTextBox.Text = "When you are ready, please select either the Log In button to login, or the Cancel button to abort.";
    if (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == false)
    this.SetFocus(this.loginUAradioButton);
    else if (this.loginUserNameTextBox.Text == String.Empty)
    this.SetFocus(this.loginUserNameTextBox);
    else if (this.loginPasswordTextBox.Text == String.Empty)
    this.SetFocus(this.loginPasswordTextBox);
    else
    this.SetFocus(this.loginSubmitButton);
    protected void loginUserNameTextBox_TextChanged(object sender, EventArgs e)
    protected void loginPasswordTextBox_TextChanged(object sender, EventArgs e)
    // For some reason, after specifying that the password entry box's textmode to 'Password' setting,
    // the UI's password textbox is emptied
    this.loginStatusInstructionTextBox.Text = "NOTICE:\nThis application is still under development.\n\n" +
    "This is why the password you entered is visible. Once this portion of the application is ready, it will be masked.\n\n" +
    "Also, still need to figure out why when changing this to Password entry mode to mask its entered data, password is getting reset.";
    protected void loginSubmitButton_Click(object sender, EventArgs e)
    this.loginLoadCycles = 0;
    this.uName = this.loginUserNameTextBox.Text;
    this.pWord = this.loginPasswordTextBox.Text;
    if (this.loginUAradioButton.Checked == true && this.loginAFradioButton.Checked == false)
    this.loginLADPauthenticate('U'); // authenticate UPS Associates against UPS Corp's Active Directory
    else if (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == true)
    this.loginLADPauthenticate('A'); // authenticate Area Franchisees against UPS Store's iNet Active Directory
    else
    // set colors to show that this is an error instead of a status message or instruction
    this.loginStatusInstructionTextBox.Text = "ERROR: Cannot log in without specifying if you are an UPS Associate or an Area Franchisee!";
    protected void loginCancelButton_Click(object sender, EventArgs e)
    this.loginStatusInstructionTextBox.Text = "You have selected to cancel from logging in...";
    // Still need to plan what to do when user cancels out of logging in. For now, just initialize class attributes
    this.loginInit();
    protected void loginUAradioButton_CheckedChanged(object sender, EventArgs e)
    String msg = String.Empty;
    if (this.loginUAradioButton.Checked == true)
    this.loginAFradioButton.Checked = false;
    msg = "Thanks for specifying that you are a TUPSS Associate. ";
    if (this.loginUserNameTextBox.Text == String.Empty)
    msg += "Now please specify your username.";
    else if (this.loginPasswordTextBox.Text == String.Empty)
    msg += "Now please enter your password.";
    this.loginStatusInstructionTextBox.Text = msg;
    protected void loginAFradioButton_CheckedChanged(object sender, EventArgs e)
    String msg = String.Empty;
    if (this.loginAFradioButton.Checked == true)
    this.loginUAradioButton.Checked = false;
    msg = "Thanks for specifying that you are an Area Franchisee. ";
    if (this.loginUserNameTextBox.Text == String.Empty)
    msg += "Now please specify your username.";
    else if (this.loginPasswordTextBox.Text == String.Empty)
    msg += "Now please enter your password.";
    this.loginStatusInstructionTextBox.Text = msg;
    private void loginLADPauthenticate(char whichActiveDirectory)
    String msg = "Authenticating user '" + this.uName + "' with password '" + this.pWord + "' against ";
    if (whichActiveDirectory == 'U')
    msg += "UPS Corp's Active Directory...";
    else if (whichActiveDirectory == 'A')
    msg += "The UPS Store's Franchisee Active Directory...";
    msg += "\n\nNOTICE:\nThis is still under development.\n\nAt this point, this application is supposed to do something else now but is not yet ready.";
    this.loginStatusInstructionTextBox.Text = msg;
    this.loginStatusInstructionTextBox.AutoPostBack = true;
    // Authenticate using LDAP
    protected void loginStatusInstructionTextBox_TextChanged(object sender, EventArgs e)
    I confirmed that I have System.DirectoryServices.dll located in
    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\v4.0_4.0.0.0__b03f5f7f11d50a3a\ folder and that I as well as System have read as well as read&execute privileges
    not only to all folders in its path but also to the DLL file itself.
    I would appreciate any help in trying to resolve this compilation error so that I can proceed with implementing LDAP features for this endeavor.
    Thanks so much,
    hguico @ The UPS Store

    Hi,
    For web application problem, please post your thread in
    ASP.NET forum.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

  • PL/SQL Procedure Compilation error

    Hi,
    <br><br>
    I have wrote a PL/SQL Stored Procedure to read a couple of table values and then output some data to a file, when I create the procedure on the database I get the following compilation error:
    <br><br>
    LINE/COL ERROR<br>
    -------- -----------------------------------------------------------------<br>
    25/7 PLS-00103: Encountered the symbol ")" when expecting one of the<br>
    following:<br>
    ( - + case mod new null <an identifier><br>
    <a double-quoted delimited-identifier> <a bind variable> avg<br>
    count current max min prior sql stddev sum variance execute<br>
    forall merge time timestamp interval date<br>
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe<br>
    The symbol "null" was substituted for ")" to continue.<br>
    <br>
    The script is below: <br><br>
    CREATE OR REPLACE <br>
         PROCEDURE TDF_EXTRACT AS<br>
    v_file UTL_FILE.FILE_TYPE;<br>
    YEAR number(4);<br>
    Q1_VALUE NUMBER(7);<br><br>
    BEGIN<br><br>
    SELECT PERSON_VALUE<br>
    INTO     Q1_VALUE<br>
    FROM PERSON<br>
    WHERE ID = 79;<br><br>
    SELECT EXTRACT(YEAR FROM SYSDATE)<br>
    INTO YEAR <br>
    FROM DUAL;<br><br>
    v_file := UTL_FILE.FOPEN(location => '/tmp',<br>
    filename => 'extratced_values.txt',<br>
    open_mode => 'W',<br>
    max_linesize => 32767);<br><br>
    UTL_FILE.PUT_LINE(v_file,<br>
    'Q1'     ||     YEAR     ||     '23'     ||     Q1_VALUE || '\r\n' ||<br>
              );<br><br>
    UTL_FILE.FCLOSE(v_file);<br><br>
    END TDF_EXTRACT;

    'Q1' || YEAR || '23' || Q1_VALUE || '\r\n' ||
    );Syntax error during concatenation, maybe?
    C.
    Message was edited by:
    cd

  • Compilation error in PL/SQL

    Hi All,
    Please find the strange query situation in PLSQL.
    If i run the query without PLSQL block (i.e. declar begin end) it runs well and insert data
    in table but if put the same query in PLSQL block it gives compilation error.
    Following is the spool
    SQL> select * from v$version;
    BANNER                                                                                                                                     
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production                                                                                 
    PL/SQL Release 8.1.7.4.0 - Production                                                                                                      
    CORE     8.1.7.0.0     Production                                                                                                                  
    TNS for IBM/AIX RISC System/6000: Version 8.1.7.4.0 - Production                                                                           
    NLSRTL Version 3.4.1.0.0 - Production                                                                                                      
    SQL> insert into smcbom_load_hours_temp
      2  select data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date) v_period,sum(v_hr),-1,sysdate,-1,sysdate
      3  from (
      4  select plan_level,sp.data_set_name,
      5  sp.value1,smcbom_flex_budget.calculate_period_days(sp.period1),inweight ,
      6  usagerate ,operationseq,percent,
      7  sbov.group_id,sp.alloy,sp.planner_code,
      8  sbov.days,sbov.totaloffsetdays,deptclass,dept,
      9  decode(plan_level,1,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate *
    10  (SELECT MAX(INWEIGHT)
    11  FROM  SMCBOM_BOM_OPERATION_VIEW
    12  WHERE ALLOY=sbov.alloy
    13  AND   PLANNER_CODE=sbov.planner_code
    14  AND   PLAN_LEVEL = 0
    15  AND   GROUP_ID = sbov.group_id ),
    16  0,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate ,
    17  1) v_hr,
    18  smcbom_flex_budget.get_start_date(sp.period14)+sbov.totaloffsetdays v_date,
    19  sum(-sbov.totaloffsetdays)
    20  over (partition by sp.alloy,sp.planner_code,sbov.group_id
    21  order by plan_level asc,operationseq desc)  new_offset
    22  from smcbom_bom_operation_view sbov,smcbom_sales_prod_forecasts sp
    23  where sbov.alloy= sp.alloy
    24  and   sbov.planner_code=sp.planner_code
    25  and group_id=521136
    26  )
    27  group by data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date);
    23 rows created.
    SQL> commit;
    Commit complete.
    SQL> declare
      2  begin
      3  insert into smcbom_load_hours_temp
      4  select data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date) v_period,sum(v_hr),-1,sysdate,-1,sysdate
      5  from (
      6  select plan_level,sp.data_set_name,
      7  sp.value1,smcbom_flex_budget.calculate_period_days(sp.period1),inweight ,
      8  usagerate ,operationseq,percent,
      9  sbov.group_id,sp.alloy,sp.planner_code,
    10  sbov.days,sbov.totaloffsetdays,deptclass,dept,
    11  decode(plan_level,1,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate *
    12  (SELECT MAX(INWEIGHT)
    13  FROM  SMCBOM_BOM_OPERATION_VIEW
    14  WHERE ALLOY=sbov.alloy
    15  AND   PLANNER_CODE=sbov.planner_code
    16  AND   PLAN_LEVEL = 0
    17  AND   GROUP_ID = sbov.group_id ),
    18  0,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate ,
    19  1) v_hr,
    20  smcbom_flex_budget.get_start_date(sp.period14)+sbov.totaloffsetdays v_date,
    21  sum(-sbov.totaloffsetdays)
    22  over (partition by sp.alloy,sp.planner_code,sbov.group_id
    23  order by plan_level asc,operationseq desc)  new_offset
    24  from smcbom_bom_operation_view sbov,smcbom_sales_prod_forecasts sp
    25  where sbov.alloy= sp.alloy
    26  and   sbov.planner_code=sp.planner_code
    27  and group_id=521136
    28  )
    29  group by data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date);
    30  end;
    31  /
    (SELECT MAX(INWEIGHT)
    ERROR at line 12:
    ORA-06550: line 12, column 2:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    ORA-06550: line 22, column 6:
    PLS-00103: Encountered the symbol "(" when expecting one of the following:
    , from
    SQL> spool off;

    In some versions of Oracle (certainly all of the 8.x versions and earlier, and possibly some of the earlier 9 versions) the SQL parsers in the SQL engine and in the PL/SQL engine were different. Some features that worked directly in SQL did not work in PL/SQL. Scalar sub-queries were one of those things.
    You have three options. You can try to re-write the insert statement to eliminate the PL/SQL unimplemented feature. You can create a view in the database for the SELECT part of the insert statement then use that view in the insert. finally, and least desirable, you can build the whole statment as a string, and use EXECUTE IMMEDIATE to run it in PL/SQL.
    HTH
    John

  • Why compilation error--when trying to access the table from itcsi schema

    Hi,
    when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem
    when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error
    1 Create or replace procedure Test_insert(p_app_i_old integer,
    2 p_app_i_new integer,
    3 p_APP_ISAC_CPT_I varchar2)
    4 is
    5 cursor c1 is
    6 select distinct table_name,owner
    7 from all_tab_columns
    8 where owner = 'ITCSI' and column_name='APP_I';
    9 t_tablename varchar2(25);
    10 t_string varchar2(300);
    11 t_num number;
    12 Begin
    13 For c2 in c1 loop
    14 t_num := 0;
    15 t_string := 'SELECT count(*) FROM ' || c2.owner ||'.'||c2.table_name||' WHERE APP_I = '||p_
    16 execute immediate t_string into t_num;
    17 if t_num > 0 then
    18 -- dbms_output.put_line('The table name is '||c1_rec.table_name);
    19 if c2.Table_name = 'APP' Then
    20 INSERT INTO itcsi.App
    21 SELECT p_app_i_new,
    22 app_acrnym_c,
    23 app_x,
    24 app_desc_t,
    25 app_ipads_t,
    26 app_prdcn_stat_t,
    27 app_prdcn_stat_d,
    28 app_isd_tier_c,
    29 app_bus_cont_c,
    30 app_extnl_cstm_c,
    31 app-ecrpt_lvl_c,
    32 app_isac_cpt_i,
    33 dsw_gpn_i,
    34 ed_cntnt_srce_t,
    35 usr_upd_uunm_i,
    36 ed_upd_m
    37 FROM itcsi.APP
    38 WHERE app_i = p_app_i_old;
    39 elsif c2.Table_name = 'APP_CETRN' Then
    40 Insert into itcsi.APP_CETRN
    41 select p_app_i_new,
    42 app_cetrn_i,
    43 app-curr_cmplnc_t,
    44 app_rqr_cmplnc_t,
    45 dsw_gpn_i,
    46 ed_cntnt_srce_t,
    47 usr_upd_uunm_i,
    48 ed_upd_m
    49 FROM itcsi.APP_CETRN
    50 WHERE app_i = p_app_i_old;
    51 elsif c2.Table_name = 'APP_GPC' Then
    52 Insert into itcsi.APP_GPC
    53 select p_app_i_new,
    54 gpc_dpnt_x,
    55 gpc_elemy_x,
    56 pro_i,
    57 dsw_gpn_i,
    58 ed_cntnt_srce_t,
    59 usr_usr_upd_uunm
    60 FROM itcsi.APP_GPC
    61 WHERE app_i = p_app_i_old;
    62 End if;
    63 End if;
    64 End loop;
    65 --Commit;
    66* End;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_INSERT:
    LINE/COL ERROR
    20/2 PL/SQL: SQL Statement ignored
    37/23 PL/SQL: ORA-00942: table or view does not exist
    40/2 PL/SQL: SQL Statement ignored
    Thanks

    how do i check the grant?
    if am in my own schema,how do i connect to itcsi
    schema?if you are using a schema other than the ITCSI schema, you need to login as ITCSI. or if you have dba user account you can grant a privilege of
      GRANT ALL on ITCSI.APPS to <other SCHEMA>;

  • Smart View compile error on startup

    Hi
    Just installed the following components:
    - Windows 2008R2
    - Office 2010 x64 with SP2
    - Smart View 11.1.2.5.210 (x64)
    When I start and close Excel I get the following:
    Microsoft Visual Basic for Applications
    Compile error in hidden module: HsTBarPublic.  This error commonly occurs when code is incompatible with the version, platform, or architecture of this application.
    The same software version works fine on 32bit versions of Office 2010 + Smart View.  Any ideas for troubleshooting 64bit Applications of Office and Smart View?
    Thanks
    Anthony

    Had the same problem with conflict between CS6 (Photoshop, Premier, After Effects, etc.] and Net Nanny.  Solution was as follows:
    1. Log onto Net Nanny Admin Tools
    2. Click on Application Exceptions
    3. Click Add
    4. Browse to folder containing "dynamiclinkmanager.exe".  On my computer (Windows 7 Pro) it was located in
         C:\Program Files (x86)\Common Files\Adobe\dynamiclink\CS6
         [I do have dynamiclinkmanager.exe elsewhere, but Net Nanny only allows you to identify a given file name once]
    5.  Select dynamiclinkmanger.exe, Open, OK
    6.  Repeat steps 3 to 5 but this time for "dynamiclinkmediaserver.exe" which I found in
         C:\Program Files (x86)\Common Files\Adobe\dynamiclinkmediaserver\1.0
    7. Click OK to accept application exceptions
    8.  Exit Net Nanny Admin Tools
    7.  On my computer Photoshop would now load without incident, but if necessary reboot.
    NOTE:  Once I solved the dynamiclinkmanager stopped problem I then encountered an Adobe Media Core stopped problem when I started After Effects and Premier.  To resolve this second problem with Net Nanny I repeated the above steps adding the following application exception:
         "Adobe QT32 Server.exe"
         which I found in
         C:\Program Files (x86)\Common Files\Adobe\dynamiclinkmediaserver\1.0
    [Again there are multiple copies of "Adobe QT32 Server.exe" but Net Nanny accepts only one, and I selected the one in "Program Files (x86)" and not the ones in "Program Files" because of this is where I also found dynamiclinkmanager.exe.  All works fine now.]
    Hope this works for you.

Maybe you are looking for

  • Updating assigment field

    Hi, I need to update the assignment FI document field, item customer,  with the PO customer number or sales document of PO (VBAK-VBELN) at the billing moment. I cannot find the correct field in TS OB16. I could update with the bill document, but not

  • How to Create a Unix Agent and data stage adapter

    Hi Gurus, I am new to this tool. We have installed trail version of tidal scheduler tool. Kindly let me know how to create a unix agent and data stage adapter using some screen shots. Also please let me know is it possible to create agents on trail v

  • Cannot connect to SQL Azure by allowing Domain Name in Firewall

    *.database.windows.net:1433/tcp is getting resolved as IP address in corporate firewall but the corporate firewall is configured to allow only domain names.Is there a way to connect to SQL Azure without domain name getting resolved into IP. All the h

  • .mov to .wmv

    Running QT Pro 7.6. I have successfully downloaded a YouTube video and convert to QT and it works. I need to put it in a PPT presentation to be used on a PC using wmv. I tried using an online service (mediaconvert) to change .mov to .wmv, but only th

  • Transferring actions in CS6 between Mac and PC

    Hi, I am struggling with getting actions I created or used on my Mac in CS6 to work on my PC (also CS6) at work. Would this be some kind of issue because they might have been created in an earlier version of CS? I have downloaded actions from the int