SELECT-INTO prepared statement?

Hi,
I have a single-row select to execute. I don't know if the multi-row select functionality (ResultSets, etc.) should be used for a single-select.
Here's from the Oracle JDBC Documentation on a prepared statement with input variables:
PreparedStatement pstmt =
conn.prepareStatement ("insert into EMP (EMPNO, ENAME) values (?, ?)");
pstmt.setInt (1, 1500); // The first ? is for EMPNO
pstmt.setString (2, "LESLIE"); // The second ? is for ENAME
pstmt.execute ();
What I would like to do is have a PreparedStatement for output variables in a SELECT-INTO:
pstmt= conn.prepareStatement("select max(sal) into ? from emp;");
but there appears to be no bind variable functionality.
Callable statements apparently are only for stored procedures.
Basically, should I just use the multirow select for this?
Thanks,
Glen

pstmt= conn.prepareStatement("select max(sal) into ?
from emp;");
but there appears to be no bind variable
functionality.You might be able to bind this as an output parameter, but it seems like extra work (just getting a ResultSet for "select max(sal) from emp" would be a lot more straight forward).
>
Callable statements apparently are only for stored
procedures.Not really, I execute PL/SQL blocks using prepared statements all the time. Sometimes it's the only way to get the data into a format that JDBC can handle.
Here's an example:
    /** This is the SQL used to call the API ... */
    public static final String spSQL =  
    "declare " +
        "t_warranty_tbl apps.cib_devo_wrapper.wartbltyp; " +
        "x_warranty_tbl apps.cib_devo_wartbltyp; " +
        "x_return_text VARCHAR2(2000); " +
    "begin " +
        "apps.cib_devo_wrapper.cib_get_warranty_info(" +
            "P_SERIAL_NUMBER => ?,"
            "X_WARRANTY_TBL => t_warranty_tbl," +
            "X_RETURN_TEXT => x_return_text," +
            "x_row_count => ?); " +
        // Convert to a table of objects ...
        "x_warranty_tbl := apps.cib_devo_wrapper.cib_warranty_casttowartbltyp(t_warranty_tbl); " +
        // Get the cursor with order by ...
        "OPEN ? FOR SELECT * FROM TABLE(CAST(x_warranty_tbl AS apps.CIB_DEVO_WarTblTyp)) tbl " +
            "WHERE tbl.entitlementReturnCode != apps.cib_devo_wrapper.g_ent_ret_code_08 " +
            "ORDER BY tbl.INSTALLEDAT_CUSTOMER_NAME, tbl.SITE_NAME, tbl.SITE_ID, " +
                      "tbl.PRODUCT_FAMILY, tbl.PRODUCT_NAME, tbl.SERIAL_NUMBER; " +
       "?:=x_return_text; " +
    "end;";In this example, I declare a few variables, call a stored procedure,
do some more PL/SQL to reduce the results before I finally bring them back.
The first placeholder (question mark) is the input serial number, the second one is an output parameter that gives the row count. The third
question mark is the cursor that contains the data I need, and the fourth is a reference to a status message.
As you can see, the PL/SQL isn't exclusively stored procedure calls.
>
Basically, should I just use the multirow select for
this?I think you'd need code that looks something like:
DECLARE
myCount NUMBER;
BEGIN
select max(sal) into myCount
from emp;
? := myCount
END;Although wrapping the select in a BEGIN..END block may be enough.

Similar Messages

  • "select into" query statements using the DI API

    I am trying to use the DI API (6.5) t create a temp table based on an existing table.  For example, here is a query string....
    select * into ORDR_TEMP from ORDR
    Code...
    oRecordSet := IRecordset(oCompany.GetBusinessObject(BoRecordset));
    oRecordset.DoQuery(sSql);
    Error I get...
    1). [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use SELECT INTO in browse mode. 2). [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared
    For any other regular select statements the previous code works.  Does anyone know for sure if a "select into" statement is not possible using the DI API?

    Hi Bill,
    I´m not really sure if select into is avaiable. But here you´ve got a hint: You could use a user defined function to do it, and just call the function from your code.
    SELECT dbo.MyFunction()
    Having this function defined in your SQL Server:
    CREATE function MyFunction ()
    returns char(2)
    AS
    Begin
    select * into ORDR_TEMP from ORDR
    Return ('OK')
    End
    Hope this helps,
    Ibai Peñ

  • Resultset from a batch select using prepared statement

    Hi,
    Is it possible to add results of batch execute of select statements and retrieve the result set ..
    I am running select statement in a batch mode setting in value for a column.I add this to a prepared batch.
    I would like to get the reults as a batch and spin through the result set like a r.next(). Is this possible ?
    I have given the code below
    sql = "select ordervalue , orderdate from discreet_orders "+
    "where order_no = ? ";
    dbObject.prepareStatement(sql);
    dbObject.prepareStatement(sql);
    for (int i=0; i < orderNoVect.size(); i++) {
    dbObject.setString(1,(String)scnV.elementAt(i));
    dbObject.addBatchPrepared();
    r = dbObject.execPrepared();
    dbObject.clearBatchPrepared();
    I would like to do a r.getNext() process the values form the resultset.
    Is this possible ? If not is there an other way to do it ?
    Thanks
    Arnold

    Olek wrote:
    hi
    Is there a way do a batch update using prepared statement?
    I don't want to insert every row in a single query...
    regards,
    OlekPossibly the confusion here stems from the existence of two addBatch methods in PreparedStatement.
    addBatch(String sql)inherited from Statement adds a new query to the batch of SQL statements for the statement. However you don't want to use this with PreparedStatements Instead you want
    addBatch()which adds the current set of parameters to the prepared statements batch of commands.
    In this scenario you prepare your query (insert statement) and then call setXXX(x,y) for each parameter and then addBatch for each tuple. Then call executeBatch to execute all the queries based on your batched parameters.
    If this didn't answer your question I don't know what your question is exactly. I would add that you probably want to set a "reasonable" size on your batches and break them into smaller batches as is reasonable. Mainly because the implementation of batched PreparedStatements widely varies depending on the database and driver, thus there are certainly scenarios where given enough batched parameters you could have various unpleasant things visited upon your program. Like terminal slowness, running out of memory, etc.

  • SELECT INTO ( variable ) STATEMENTS NOT WORKING FOR SYBASE TABLE AS VIEW

    Dear Experts,
    We have connected our 9i db with Sybase db using Hs connectivity.
    and then we have create the view in oracle db for SYBASE_TABLE as SYBASE_TABLE_VIEW.
    ALL THE INSERT, UPDATE AND DELETE COMMANDS ARE WORKING BUT THE
    select Into (variable) is not working.
    Please help to resolve the select into statment which is in BOLD in the below routine
    PLEASE NOTE! FORM WAS COMPILED SUCCESSFULLY AND FORM IS RUNNING BUT SELECT INTO COMMAND IS NOT WORKING.
    Thanks & Regards
    Eidy
    PROCEDURE SRBL_INSERT IS
    CURSOR SRBL IS
         SELECT impno,impcod,impnam
         from oracle_table1 a, oracle_table2 b
         WHERE a.impcod=b.empcod
         v_srpcod varchar2(5);
    BEGIN     
    FOR rec in SRBL loop     
         begin
    select "im_code" into v_impcod                    
         from SYBASE_TABLE_VIEW
         where "im_code"=rec.impcod;
    exception when no_data_found then
         v_srpcod:=null;
    end;
    END LOOP;
    END;
    Edited by: Eidy on Aug 16, 2010 11:28 AM

    hellow
    try this.
    select "im_code" into v_impcod
    from SYBASE_TABLE_VIEW
    where "im_code"=rec.impcod;
    v_srpcod := v_impcod ;
    ........

  • Prepared Statement and Stored Procedure..

    I have about 200 SQL statement in my Java application
    I have two options either to convert into
    Stored procedures
    or to convert into prepared statement ....
    Please guide me which options should be best....
    I need difference
    1)in term of speed.
    2)Memory..
    Regards
    Mahesh
    Senior DBA

    club your statements on the basis of related functionalities and change it to stored procedures as it will redudce no. of calls to the database and will be faster to fetch data in one go and even reduce the memory requirements.

  • Using a Prepared stat - Can a select SQL exist inside an Insert SQL

    Trying to insert values into the DB2UDB 7.1 database , using Prepared statement. I am getting a SQL exception as follows:
    SystemErr R java.sql.SQLException: Could not execute sql command - Original message: [IBM][CLI Driver][DB2] SQL0418N A statement contains a use of a parameter marker that is not valid. SQLSTATE=42610
    String reviewQuery = " INSERT INTO REVIEW (SUPLR_CD,STAT_CD,REVW_DATE,CREATE_UID) SELECT A.SUPLR_CD,?,CURRENT DATE,? FROM REV_CLAIMS A , SUPLR B
    WHERE A.SUPLR_CD = ? AND A.STAT_CD = ? and A.SUPLR_CD = B.SUPLR_CD
    sqlStmt =
    StatementFactory.getStatement(con,reviewQuery,BaseDAO.QUERY_DEBUG);
    sqlStmt.setString(1, statusCode);
    sqlStmt.setString(2, userId);
    sqlStmt.setString(3, supplierCode);
    sqlStmt.setString(4,reviewStatus);
    Can you please help me in solving this issue.
    Thanks,
    Ronhelp

    I guess that DB2 doesn't know your sql. You can try.
    String reviewQuery = " INSERT INTO REVIEW (SUPLR_CD,STAT_CD,REVW_DATE,CREATE_UID) SELECT A.SUPLR_CD,"+statusCode+",CURRENT DATE,"+userId+" FROM REV_CLAIMS A , SUPLR B
    WHERE A.SUPLR_CD = ? AND A.STAT_CD = ? and A.SUPLR_CD = B.SUPLR_CD
    sqlStmt =
    StatementFactory.getStatement(con,reviewQuery,BaseDAO.QUERY_DEBUG);
    sqlStmt.setString(1, supplierCode);
    sqlStmt.setString(2,reviewStatus);

  • Can i include variable in select into statement?

    Hi all,
    Is it possible to include a variable name in the "select into" statement ? For ex:
    "Select empname into variable_Name from employee" In this case variable_Name is the variable.Will this statement work by assigning empname to variable_Name if there is only one record in the employee table?please reply....c ya.

    Surely you have to? You can hardly SELECT INTO a constant. Perhaps I'm missing something,

  • Using SELECT INTO statement to transfer data from one DB to another?

    Hello,
    I need to move data from an SAP table to another downstream SQL server box without flat file in between. I have set up the DBCON interface, so that my ABAP code on SAP can connect to the remote SQL Server, then I can run INSERT command as Native SQL inside the ABAP.
    However, INSERT has performance problem. The best performer as I can find is SELECT INTO statement. But then I am stuck at how to use SELECT INTO to query my local SAP table and send (via INTO) to remote database. I am not even sure whether I should use Open SQL or Native SQL.
    Any suggestion? BTW, I understand the limitation of Native SQL, but we are OK to use it.
    Thanks!

    It appears that this is some kind of migration project due to the scope of the data contained in the single file? If so whatever you do is like ly to be trow away once the migration of data is completed.
    You have a couple of options:
    1) Get the data extracted from HFM in multiple files instead of one bulk file, broken down by scanario,year & period
    2) Take the single data dump file produced by FDM and manipulate it yourself to get the data in a more usuable format for processing through FDM.
    Option 2 could be achieved via any ETL tool or a custom file parsing script. What may be more attractive to you and allow you to fully leverage your investment in FDM is that you could use the PULL adapter that ships as part of the FDM adapter suite to perform this transformation exercise. The PULL adapter takes a flat file input and allows you to use all the in built functionality of FDM to transform it and output a modified flat file (or series of flat files). You could use it to produce multioload files or a series of files broken down by scenario,year,period.
    Whatever you do I would suggest that break the single data file down into smaller chunks as this will help with the iterative debugging process you will inevitably have to undetake whislt migrating the data to the new application.

  • Prepared Statement, executing  SELECT TOP in Ms Access

    I'm having the following problem. I built an application fetching data without any problem from MS SQL Server, this was using prepared statements. Now i'm having this strange problem with the following query:
    SELECT TOP 1 *
    FROM table
    WHERE appliance_id = ?
    AND ttimestamp_initpk <= ?
    AND ((Type = ?) OR (Type = ?) OR (Type = ?) OR (Type = ?) OR (Type = ?) OR (Type = ?))
    ORDER BY ttimestamp_initpk DESC
    While on SQL Server this fetches just a record, on MS Access it fetches the whole set of records without worrying about TOP instruction.
    That is, it acts like a SELECT * FROM, and this slows down runtime behaviour.
    I'm using sun.jdbc.odbc.JdbcOdbcDriver, is it the problem?
    Thanks, Mirko

    Thanks for your answer, but i'm not sure this is the reason.
    I made one more test: i wrote a .Net application connecting to a MS Access using an ODBC connection. SELECT TOP statement is working fine, so i think i'll try another JDBC driver. Any other solution??
    Thanks,
    Mirko

  • Where clause in SELECT INTO statement

    Hi,
    I am using multiple conditions in where clause for my SELECT INTO statement as follows.
    SELECT count(DTLA.LOCATION_ID)
    INTO LOCATION_ID_count
    FROM DOC2_MGR.DOC_TYPE_LOB_ASSOC DTLA
    WHERE (DTLA.DOC_TYPE_ID = 'XYZ' AND DTLA.lob_code = 'ABC');
    It considers only first condition and returns the result i.e. DTLA.DOC_TYPE_ID = 'XYZ' only.
    Does select into statement suppose to consider only one condition in where clause???
    Thanks in advance!
    --Sandeep                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I got it resolved. Here is list of things I noted
    1. I was using variable names same as column names. It was mixing up temp variable names with column name on the table, which doesn't make sense as I was referring column names in table.column format
    2. I had mixed few datatypes. Input param was suppose to be number where as I was passing it as Text
    Thanks anyway!
    --Sandeep                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to use INSERT INTO ALL statement in jdbc prepared statement with beans

    Kindly give me some example that how we can use "INSERT INTO ALL STATEMENT" in jdbc prepared statement inside a jsf bean?
    Actually i want to take employee id's of present employees using single jsf page and using one textbox for each employee id.
    How can i use INSERT INTO ALL statement to achieve this?
    Following is my code snippet.
    AttendanceBean.java:
    public class AttendanceBean {
    private int atteid;
    private String attdname;
    private int attday;
    private int attmonth;
    private int attyear;
    public static Connection getAttConnection() throws Exception {
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@localhost:1521:globldb3";
    String username = "scott";
    String password = "tiger";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url, username, password);
    return conn;
    public String addAttendance(){
    Connection conn = null;
    PreparedStatement pstmt = null;
    boolean committed = false;
    try {
    conn = getAttConnection();
    conn.setAutoCommit(false);
    String query = "INSERT ALL INTO attendance VALUES (?,?,?,?,?)";
    pstmt = conn.prepareStatement(query);
    pstmt.setInt(1,this.atteid);
    pstmt.setString(2,this.attdname);
    pstmt.setInt(3,this.attday);
    pstmt.setInt(4,this.attmonth);
    pstmt.setInt(5,this.attyear);
    pstmt.executeUpdate();
    conn.commit();
    conn.setAutoCommit(true);
    committed = true;
    return "home.xhtml";
    } catch (Exception e) {
    e.printStackTrace();
    return "CRM.xhtml";
    } finally {
    try{
    if (!committed) conn.rollback();
    if (pstmt != null) pstmt.close();
    if (conn != null) conn.close();
    }catch(Exception e){
    e.printStackTrace();
    }

    Check this program for some info on Push buttons:
    1-DEMO_DYNPRO_PUSH_BUTTON
    2-DEMO_DYNPRO_MODULE
    3-DEMO_DYNPRO_ON_CONDITION
    Suppose Your screen is 101
    Then in that screen create one push button and assign it a function code.
    Now in the PAI of the 101 screen
    Create Module for user command
    Inside that module checc the sy-ucomm if sy-ucomm eq <Function code of your push button>
    Insert the values in database.
    *& Module USER_COMMAND_0101 INPUT
    process after input for screen 0101 *
    MODULE USER_COMMAND_0101 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    *Insert the values here
    WHEN 'DISP'.
    ENDCASE.
    CLEAR OK_CODE.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    Regards
    Neha
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:06 AM

  • SELECT INTO statement

    Hello
    I have entered the following statement into the SQL Command Processor in HTML Db:
    select * into DEMO_CUSTOMERS_COPY from DEMO_CUSTOMERS
    I get the following error:
    ORA-00905: missing keyword
    Can anyone tell me why I'm getting this error? I think the syntax of the statement looks ok to me but I may be wrong
    Thanks,
    Simon

    Hi Simon,
    No problem...glad to help.
    Your original command (with a little modification) is the sort of thing you usually see in PL/SQL where you want to extract a column (or record) from a table, for example
    SQL> set serveroutput on;
    SQL>  declare
       v_value dual.dummy%TYPE;
    begin
      select
        dummy
      into
        v_value
      from dual;
      dbms_output.put_line('The value is: ' || v_value);
    end;
    The value is: XNote that "select..into" requires only one row to be returned, so if multiple rows are returned then you'll get a TOO_MANY_ROWS exception.
    Hope this helps.

  • How to modify a Procedure "select into" statement to use a cursor

    The below code fails with exception too many rows. How do I modify the Procedure's Select Into statement to use a cursor?
    CREATE OR REPLACE PROCEDURE Track_Asset(
       business_date IN NUMBER DEFAULT NULL,
       missing_table_name  OUT VARCHAR2)
    IS
       ln_business_date NUMBER;
        incorrectdateformat EXCEPTION;
    BEGIN
       IF business_date < 0
       THEN
          RAISE incorrectdateformat;
       ELSE
          DECLARE
            ln_business_date NUMBER;
          BEGIN
             SELECT MAX(business_date)
             INTO ln_business_date
             FROM sproof ;
          EXCEPTION
            WHEN NO_DATA_FOUND THEN
             dbms_output.put_line('NO MATCH FOUND');
            WHEN OTHERS THEN
            dbms_output.put_line('ORACLE ERROR :' || SQLERRM);       
          END;
          DECLARE
            missedfeedfnd EXCEPTION;
          BEGIN
             SELECT 'Missing Value : ' || table_name
             INTO missing_table_name
             FROM (
                SELECT UPPER(table_name) table_name
                FROM filespec
                WHERE data_table_name IN ('TABLE1','TABLE2','TABLE3')
                MINUS (
                SELECT DISTINCT UPPER(first_table_name)
                FROM dpca
                WHERE business_date = ln_business_date
                AND first_table_name IN ('TABLE1','TABLE2','TABLE3')
                GROUP BY UPPER(first_table_name) UNION
                SELECT UPPER(first_table_name)
                FROM dpca
                WHERE business_dt_num = TO_NUMBER( SUBSTR('201111', 1, 6) || '01' )
                AND first_table_name = 'TABLE4'
                GROUP BY UPPER(first_table_name) ));
                IF missing_table_name  IS NOT NULL THEN
                   dbms_output.put_line('Missing Value : '|| missing_table_name);
                   RAISE missedfeedfnd;
                ELSE
                  NULL;
                END IF;
          EXCEPTION
             WHEN TOO_MANY_ROWS THEN
       DBMS_OUTPUT.PUT_LINE (' SELECT INTO statement retrieved multiple rows');
              WHEN missedfeedfnd THEN
              raise_application_error ( - 20003, 'Missed Feed');
          END;
        END IF;
          EXCEPTION
       WHEN incorrectdatevalue
       THEN
          raise_application_error ( - 20001, 'Incorrect/Bad Date Entered');
    END;

    ok try this - OUT param will be populated with comma separated list of table names:
    PROCEDURE Track_Asset(
       business_date IN NUMBER DEFAULT NULL,
       missing_table_name  OUT VARCHAR2)
    cursor c_table_names is
    select datatablename
    from   ( select upper(datatablename) datatablename
             from   filespec
             where  data_table_name in ('TABLE1','TABLE2','TABLE3'                                 )
            MINUS
            ( select upper(first_table_name)
              from   dpca
              where  business_dt_num = [-- this date is retrieved by getting the MAX(business_date) from sproof table]
                     and fus_data_table_name in ('TABLE1','TABLE2','TABLE3'
              group  by
                     upper(first_table_name)
             UNION
              select upper(first_table_name)
              from   dpca
              where  business_dt_num = to_number( substr('201111',1,6) || '01' )
                     and first_table_name = 'TABLE4'
              group  by
                     upper(first_table_name)
    begin
       for rec in c_table_names
       loop
           missing_table_name  := missing_table_name  || rec.datatablename ||',';
       end loop;
       missing_table_name  := rtim(missing_table_name , ',');
    end ;HTH
    Edited by: user130038 on Dec 28, 2011 8:46 AM

  • How to enable multi-statement replication like select into in SAP Replication server

    Hi All,
    Currently I am worling on replication of non logged operation using SAP Replication Server.My source and target databases both are Sybase ASE 15.7. I created a normal stored procedure having non logged operation like :
    create procedure proc1
    as
    select * into tab2 from tab1
    I have created database replication definition using following command :
    create database replication definition def1
    with primary at dewdfgwp01694.src
    replicate DDL
    replicate functions
    replicate transactions
    replicate tables
    and created subscription as well
    After marking the procedure using sp_setrepproc proc1,'function', I started the repagent (sp_start_rep_agent src)
    But after marking the procedure I am unable to execute the procedure and having the error :
    SELECT INTO command not allowed within multi statement transactions
    Sybase error code=226
    Can anyone please guide me in this situation
    FYI : I have executed all three commands in primary database :
    sp_dboption src,'select into/bulkcopy/pllsort',true;
    sp_dboption src,'ddl in tran',true;
    sp_dboption src,'full logging for all',true

    I am getting the error in primary database(Sybase ASE console) as well as in repserver .
    This error is occurring after the marking of the procedure in the primary database for replicating.
    And after getting this error i am unable to replicate any other table or procedure(seems the DSI thread is going down in repserver)
    the error in repserver is given below :
    T. 2014/09/20 16:58:03. (27): Last command(s) to 'server_name.trg':
    T. 2014/09/20 16:58:03. (27): 'begin transaction  [0a] exec proc1  '
    E. 2014/09/20 16:58:03. ERROR #1028 DSI EXEC(103(1) 'server_name.trg) - dsiqmint.c(4710)
    Message from server: Message: 226, State 1, Severity 16 -- 'SELECT INTO command not allowed within multi-statement transaction.
    H. 2014/09/20 16:58:03. THREAD FATAL ERROR #5049 DSI EXEC(103(1) server_name.trg) - dsiqmint.c(4723)
    The DSI thread for database 'server_name.trg' is being shutdown. DSI received data server error #226 which is mapped to STOP_REPLICATION. See logged data server errors for more information. The data server error was caused by output command #0 mapped from input command #0 of the failed transaction.
    I. 2014/09/20 16:58:03. The DSI thread for database 'server_name.trg' is shutdown.
    I. 2014/09/20 18:07:48. Replication Agent for server_name.src connected in passthru mode.

  • Select Into statement in db function - query from granted schema table

    problem with "select into" in db function in 10.2
    There are two schemas. 'mdbdev' is the master database and 'devusr' is granted SELECT table access to execute queries in mdbdev schema.
    with devusr, in SQL, I'm able to execute the following query
    select wm_concat(strConcatedCountryList)
    from (select country_name as strConcatedCountryList from mdbdev.country_master mdbcm
    where mdbcm.country_ship_status = <param?>
    order by country_name)
    but when I use the same query in function/procedure with "select into", the compilation failed with error *"table or view does not exist"*
    FUNCTION GETCOUNTRYLISTTOSHIP (SHIP_STATUS IN NUMBER)
    RETURN VARCHAR2
    IS
    var2CountryList VARCHAR2(1000);
    BEGIN
    select wm_concat(strConcatedCountryList) INTO var2CountryList
    from (select country_name as strConcatedCountryList from mdbdev.country_master mdbcm
    where mdbcm.country_ship_status = <value of SHIP_STATUS>
    order by country_name);
    return var2CountryList;
    END;
    Please advise/help/hint :)

    David, Justine, Thank you. The facts from this forum post helped a lot to get the solution.
    The query helped a lot (select * from all_tab_privs_recd where owner = 'MDBDEV' and table_name = 'COUNTRY_MASTER").
    there was a grant using ???(donno wht DBA said) and no direct SELECT grant on that country_master to "devusr". grant command executed. Now, it works :)

Maybe you are looking for

  • EDI without message control

    I am getting  Invoice list in EDI form. I need to get that data into R/3 with out using Message Control. How to do that ?

  • Can someone tell me how to backup my 3rd generation ipod touch?

    I have a 64GB 3rd generation ipod touch. I have been  trying for the past two days to back it up to my laptop but it will not work. I have heard that if i update it without backing it up it will delete everything on my ipod and I really dont want to

  • IPod not recognized by computer - folder icon

    Hi. I have a 3rd generation iPod that displays the folder icon with the exclamation mark when I try to start it. If I hook it to my computer, the icon changes to the "OK to disconnect" message, and it indicates that it is in "Disk Mode". If I disconn

  • Can't brows music and movies in iTunes on my computer and iPhone ever since I changed my country/region

    When I first made it I selected the USA as my country because I didn't have my credit card information and even without my apple ID I was able to browse songs on my computer before. Now I changed the country to Lebanon (Middle East) and I can't brows

  • My web brower is not supported???

    I work from home and am a first time Mac owner. One of the companies I work with has an online rating system I need to use on a regular basis. I tried to get into today for the first time and it says my web brower is not supported. I called them and