Use a variable as a table name with NATIVE SQL

Hi all,
I am trying to execute a SELECT statement in order to fetch data from an external Oracle DB table to SAP with the following instructions:
EXEC SQL.
  SELECT cityfrom, cityto
         INTO STRUCTURE :wa
         FROM spfli
         WHERE mandt  = :sy-mandt AND
               carrid = :p_carrid AND connid = :p_connid
ENDEXEC.
However, I need to indicate the external table name from a variable instead of the solution above. That is, declaring a variable and store the name of the table (e.q. spfli) in it. The resulting ABAP code would be something like:
EXEC SQL.
  SELECT cityfrom, cityto
         INTO STRUCTURE :wa
         FROM <VARIABLE>
         WHERE mandt  = :sy-mandt AND
               carrid = :p_carrid AND connid = :p_connid
ENDEXEC.
Does anybody know if is possible to do that?
If not, is there any other solution?
Thank you in advance

Yes, as Suhas said, you could use the ADBC API and his class CL_SQL_CONNECTION to achieve this...
Here is a small example:
PARAMETERS: p_carrid TYPE spfli-carrid,
                           p_connid TYPE spfli-connid.
DATA:
  l_con_ref      TYPE REF TO cl_sql_connection,
  l_stmt         TYPE string,
  l_stmt_ref     TYPE REF TO cl_sql_statement,
  l_dref         TYPE REF TO data,
  l_res_ref      TYPE REF TO cl_sql_result_set,
  l_col1         TYPE spfli-carrid,
  l_col2         TYPE spfli-connid,
  l_wa           TYPE spfli.
CONSTANTS:
  c_tabname  TYPE string VALUE 'SPFLI'.
* Create the connecction object
CREATE OBJECT l_con_ref.
* Create the SQL statement object
CONCATENATE 'select * from' c_tabname 'where carrid = ? and connid = ?'
       INTO l_stmt SEPARATED BY space.                           "#EC NOTEXT
l_stmt_ref = l_con_ref->create_statement( ).
* Bind input variables
GET REFERENCE OF l_col1 INTO l_dref.
l_stmt_ref->set_param( l_dref ).
GET REFERENCE OF l_col2 INTO l_dref.
l_stmt_ref->set_param( l_dref ).
* Set the input value and execute the query
l_col1 = p_carrid.
l_col2 = p_connid.
l_res_ref = l_stmt_ref->execute_query( l_stmt ).
* Set output structure
GET REFERENCE OF l_wa INTO l_dref.
l_res_ref->set_param_struct( l_dref ).
* Show result
WHILE l_res_ref->next( ) > 0.
  WRITE: / 'Result:', l_wa-carrid, l_wa-connid.
ENDWHILE.
* Close the result set object
l_res_ref->close( ).
Otherwise you can also use the FM DB_EXECUTE_SQL...
Kr,
m.

Similar Messages

  • How to use a variable as a table name in PL/SQL?

    Hello all.
    I was given one day to wrote a piece of PL/SQL code to do a query. That is,
    First select two columns from one table and use them to build another table's name, then
         join the two tables. I'm not sure if variables can be used in the select list, if possible,
         how to reference them?
    -- My code is
    DECLARE
         tablename varchar2(40);
         CURSOR c1 IS
    select a.sourcesystemcode, a.adminorganizationno from cdb1.organization_mapping a
    where exists( select 1 from cdb1.organization_mapping b where
    a.cdborganizationno = b.cdborganizationno and a.adminorganizationno != b.adminorganizationno)
    order by a.cdborganizationno,a.adminorganizationno;
         v_src_sys_cod cdb1.organization_mapping.sourcesystemcode%TYPE;
         v_adm_org_no cdb1.organization_mapping.adminorganizationno%TYPE;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO v_src_sys_cod, v_adm_org_no;
    EXIT WHEN c1%NOTFOUND;
    tablename := 'ODS1.SRC_' || v_src_sys_cod || v_adm_org_no || 'ACTORG_CURR';
    select c.cdborganizationno, c.sourcesystemcode, c.adminorganizationno, c.sourceorganizationno, d.ibkcde, d.orgnam
    from cdb1.organization_mapping c inner join tablename d on c.sourceorganizationno = d.orgidt;
    END LOOP;
    CLOSE c1;
    END;
    The error message says "... the table or view does not exist... line 18, column 66..."
    It says the variable "tablename" wasn't build or build incorrectly.
    Please give the solution.

    If the TABLEs being queried are already known, and it is just a matter of which one to query, perhaps you can CREATE a VIEW that uses all the TABLEs with a UNION ALL, and include an identifier COLUMN.
    CREATE VIEW SRC_ALL_ACTORG_CURR
    AS
    SELECT 'aa' Name, ibkcde, orgnam FROM SRC_aa_ACTORG_CURR UNION ALL
    SELECT 'bb' Name, ibkcde, orgnam FROM SRC_bb_ACTORG_CURR UNION ALL
    SELECT 'cc' Name, ibkcde, orgnam FROM SRC_cc_ACTORG_CURR UNION ALL
    SELECT 'dd' Name, ibkcde, orgnam FROM SRC_dd_ACTORG_CURR UNION ALL
    SELECT 'ee' Name, ibkcde, orgnam FROM SRC_ee_ACTORG_CURR;
    Then, in you query:
    select c.cdborganizationno, c.sourcesystemcode, c.adminorganizationno, c.sourceorganizationno, d.ibkcde, d.orgnam
    from cdb1.organization_mapping c inner join SRC_ALL_ACTORG_CURR d on c.sourceorganizationno = d.orgidt and d.Name = v_src_sys_cod || v_adm_org_no;

  • Dynamic table name in native SQL

    Hi,
    How can i use dynamic table name in native SQL?
    My req is to select data from a external database table , but the table name will be only poulated during runtime.
    How can i acheive this?
    Regards,
    Arun.

    It should work OK - see demo below.
    Jonathan
    report zsdn_jc_adbc_test.
    start-of-selection.
      perform demo_lookup.
    form demo_lookup.
      data:
        l_error_msg          type string,
        ls_t001              type t001, "Company
        ls_t003              type t003. "Doc types
      perform dynamic_lookup
        using
          'T001'
        changing
          ls_t001
          l_error_msg.
      write: / l_error_msg.
      perform dynamic_lookup
        using
          'T003'
        changing
          ls_t003
          l_error_msg.
      write: / l_error_msg.
    endform.
    form dynamic_lookup
      using
        i_tabname            type tabname
      changing
        os_data              type any
        o_error_msg          type string.
    * Use ADBC to select data
      data:
        l_mandt_ref          type ref to data,
        l_result_ref         type ref to data,
        l_mandt              type symandt,
        l_tabname            type tabname,
        l_sql_statement      type string,
        lo_cx_root           type ref to cx_root,
        lo_cx_sql            type ref to cx_sql_exception,
        lo_connection        type ref to cl_sql_connection,
        lo_statement         type ref to cl_sql_statement,
        lo_result_set        type ref to cl_sql_result_set.
      clear: os_data, o_error_msg.
      get reference of l_mandt into l_mandt_ref.
      get reference of os_data into l_result_ref.
      l_mandt   = '222'.   "i.e. select from client 222
      l_tabname = i_tabname.
      try.
          lo_connection = cl_sql_connection=>get_connection( ).
          lo_statement  = lo_connection->create_statement( ).
    * Set criteria for select:
          lo_statement->set_param( l_mandt_ref ).
          concatenate
            'select * from' l_tabname
            'where mandt = ?'
            into l_sql_statement separated by space.
    * Execute
          call method lo_statement->execute_query
            exporting
              statement   = l_sql_statement
              hold_cursor = space
            receiving
              result_set  = lo_result_set.
    * Get the data from the resultset.
          lo_result_set->set_param_struct( l_result_ref ).
          while lo_result_set->next( ) > 0.
            write: / os_data.
          endwhile.
    * Tidy up:
          lo_result_set->close( ).
          lo_connection->close( ).
        catch cx_sql_exception into lo_cx_sql.
          o_error_msg = lo_cx_sql->get_text( ).
        catch cx_root into lo_cx_root.
          o_error_msg = lo_cx_root->get_text( ).
      endtry.
    endform.

  • MySQL - In a Query, Using a Variable as a Table Name

    Hello,
    The code I have attached works. However, I would like to
    replace the table name "tractors" with the variable "$result". How
    do I do this? (It doesn't work if I just type "$result" where
    "tractors" is.)
    Thanks,
    John

    ArizonaJohn wrote:
    > The code I have attached works. However, I would like to
    replace the table
    > name "tractors" with the variable "$result". How do I do
    this?
    You can't. In the code you have given $result is a MySQL
    database result
    resource. You need to extract the actual value from the
    result resource
    in the same way as you have done by using
    mysql_fetch_array().
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • How to use bind variable value for table name in select statement.

    Hi everyone,
    I am having tough time to use value of bind variable for table name in select statement. I tried &p37_table_name. ,
    :p37_table_name or v('p37_table_name) but none worked.
    Following is the sql for interactive report:
    select * from v('p37_table_name') where key_loc = :P37_KEY_LOC and
    to_char(inspection_dte,'mm/dd/yyyy') = :P37_INSP_DT AND :p37_column_name is not null ;
    I am setting value of p37_table_name in previous page which is atm_state_day_insp.
    Following is error msg:
    "Query cannot be parsed, please check the syntax of your query. (ORA-00933: SQL command not properly ended) "
    Any help would be higly appreciated.
    Raj

    Interestingly enough I always had the same impression that you had to use a function to do this but found out from someone else that all you need to do is change the radio button from Use Query-Specific Column Names and Validate Query to Use Generic Column Names (parse query at runtime only). Apex will substitute your bind variable for you at run-time (something you can't normally do in pl/sql without using dynamic sql)

  • Dynamic table name in native sql query

    Can i pass a dynamic table name in this query ---
                EXEC SQL PERFORMING APPEND_MTO.
                  SELECT          
                               LTOG_QUANTITY_TYPE,
                               FCONO,
                              WBSELEMENT,
                             PROJECT
                  INTO   :IMTO
                  FROM  RWORKS.MTO_ISO_V2
                  WHERE LTOD_DATE > TO_DATE(:MAXD,'YYYYMMDDHH24MISS')
                ENDEXEC.
    How can i pass this table name RWORKS.MTO_ISO_V2  dynamically in the query
    Edited by: Madhukar Shetty on Nov 26, 2009 2:40 PM

    Can i pass a dynamic table name in this query ---
                EXEC SQL PERFORMING APPEND_MTO.
                  SELECT          
                               LTOG_QUANTITY_TYPE,
                               FCONO,
                              WBSELEMENT,
                             PROJECT
                  INTO   :IMTO
                  FROM  RWORKS.MTO_ISO_V2
                  WHERE LTOD_DATE > TO_DATE(:MAXD,'YYYYMMDDHH24MISS')
                ENDEXEC.
    How can i pass this table name RWORKS.MTO_ISO_V2  dynamically in the query
    Edited by: Madhukar Shetty on Nov 26, 2009 2:40 PM

  • PL/SQL - Using a variable as a table name

    I have a procedure like this -
    PROCEDURE insert_food IS
    BEGIN
    INSERT INTO food_table
    SELECT *
    FROM fruit_table;
    END insert_food;
    So this proceudre would insert all the records in the 'fruit_table' into the 'food_table'.
    Would there be any way to store the 'fruit_table' as a variable and use that in the script?
    Something like -
    PROCEDURE insert_food IS
    table_name varchar(11) := 'fruit_table';
    BEGIN
    INSERT INTO food_table
    SELECT *
    FROM table_name;
    END insert_food;
    Any help would be great!

    create or replace PROCEDURE insert_food IS
    table_name1 varchar(11) := 'emp';
    BEGIN
    execute immediate 'INSERT INTO emp2
    SELECT *
    FROM '||table_name1||'';
    commit;
    END insert_food;then
    exec insert_food;

  • Query SAP Database with Native Sql.

    Hi,
    I would like to query the table MARA with native sql and return all headings and data
    Select * from MARA where MATNR = '00000000151515'          
    <i>I need this to be able to TEST my Sql statements.</i>
    In SqlServer you have the Query Analyser where I can do just this, but is there some nice in SAP Tool for this as well ?
    [Unfortanely I can't connect to SAP_U01 database from QA...]
    //Martin

    Hi Martin,
    maybe you give ST05 a try: last button gives the possibility to enter a SQL-statement directly - and for explanation it has to be executed (somehow).
    Regards,
    Christian

  • Use of quotes in a table name?

    Hello,
    It seems Oracle treats a table name with and without quotes differently.
    SQL> create table abc (x integer);
    SQL> create table "abc" (y integer);
    These two commands result in two different tables as can be seen from the following commands:
    SQL> desc abc;
    SQL> desc "abc";
    However, I cannot get the list of tables.
    SQL> select * from tab where tname like '%abc%';
    returns just one row.
    SQL> select * from all_objects where object_name like '%abc%' also does not show me abc and "abc" as two separate tables.
    Q1. Is there a way to obtain the proper list?
    Q2. What is the proper qualifier for specifing a table name? For example, SQL Server supports "[" and "]" around the table name. However, I could not find the equivalent grammar for PL/SQL.
    The following command works (by trial and error):
    SQL> select * from (abc);
    However, the following doesn't:
    SQL> drop table (abc);
    which means that "(" and ")" are not the qualifiers.
    Thank you in advance for your help.
    Pradeep

    Import and export and the other tools use quotes so
    that objects will be properly re-created as they were
    originally specified, even if some one uses reserved
    words or case sensitive names. At least they should. I recently had a customer using FoxPro (!) to access my Oracle Datawarehouse and he named one of his column "ALTER" (age in german). Then he complained that my database is not working because he was getting an Oracle error (ORA-00936: missing expression)!
    However, if some developer made me
    type:
    SELECT "MyCol1", "MyCol2", ...
    FROM "HisTable"
    WHERE "SomeStrangeColumnName" = 42every time,
    I would think seriously of homocide :-).I know the feeling :-)

  • Using a parameter for a table name?

    In SQL Server, can you use a parameter for a table name?  I'm working with Visual C# and want to do something like this:
    SELECT MAX(ItemID) FROM @TableName;
    Can this be done?
    (Basically, I have three separate methods within a class--one for each table I have; and each one will perform the above query but on different table names.  I'd like to see if there is a way that I can have just one method that will allow me to specify
    the table name.)

    As pointed out in other posts, you can. But a more relevant question is whether you should.
    A table in a relational database is supposed to model a unique entity, and each column in the table is supposed to model a unique attribute. This is not always how it is, but it is from this model a relational database is designed.
    From this angle, having a dynamic table name does not really make sense for application code. (Administrative actions is a different story.) Think of it this way: have you ever wanted to make the class name dynamic in C#?
    Admittedly, it is different in .NET, because everything inherits from System.Object, but in a relational database there is no inheritence.
    Anyway, if you are using stored procedures, you should have one stored procedure per table. Physically, in the plan cache, there will be one query plan per table, no matter how you do it.
    If you are submitting SQL statements from your application, it is a different matter. In this case, I find it difficult to object if you have a class that performs generic actions against tables. Then you build the SQL string in the client code.
    However, no matter how you do it, you need to be careful to avoid SQL injection. We had the example:
    DECLARE @TableName nvarchar(50),@sqlCommand nvarchar(max)
      SET @TableName = ' ItemInformation'
      SET @sqlCommand = 'SELECT MAX(ItemID) FROM ' + @TableName
    EXEC (@sqlCommand)
    But what if we have:
      SET @TableName = ' sys.objects; SHUTDOWN WITH NOWAIT; --'
    As long as we do it in T-SQL, we can (and we should do!) this to prevent SQL injection:
      SET @sqlCommand = 'SELECT MAX(ItemID) FROM ' + quotename(@TableName)
    If you build your SQL strings in C#, you will need to employ other checks. There is only an issue if the user can inject data somewhere, but your generic class will not have knowledge of this, and must assume the worst.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to find the column name and table name with a value

    Hi All
    How to find the column name and table name with "Value".
    For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
    Any help is highly appricatable
    Thanks & Regards
    Srikkanth.M

    2 solutions by Michaels (the latter is 11g upwards only)...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from cols,
           xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
           columns result varchar2(10) path '.'
    where table_name in ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.

  • Sql statement for a table name with a space in between

    Hi,
    I just noticed that one of my tables for Access is consisted of two word. It is called "CURRENT CPL". How would I put this table name into an sql statement. When I did what I normally do, it only reads the CURRENT and thinks that's the table name.
    Thanks
    Feng

    I just noticed that one of my tables for Access is
    consisted of two word. It is called "CURRENT CPL".
    How would I put this table name into an sql
    statement. When I did what I normally do, it only
    reads the CURRENT and thinks that's the table name.That is called a quoted identifier. The SQL (not java) for this would look like this....
    select "my field" from "CURRENT CPL"
    The double quote is the correct character to use. Note that quoted identifiers are case sensitive, normal SQL is not.

  • SQL or PL/SQL : dynamically insert table name in a SQL Statement

    Hi,
    We have a strange requirement - we need to dynamically use the table names in a SQL Query. E.g:
    select * from :table_name
    The table_name will be chosen from a list. I have tried this in SQL as well as PL SQL - but, I have been unsuccessul so far.
    Can you guys please help me solve this puzzle ?
    I hope I have explained my quesion clearly - if not, please do let me know if some more details are necessary.
    Regards,
    Ramky

    The following is the anonymous block that im using in a report in HTMLDB. My problem is Line Number 9. The bind variable contains the chosen table name at
    the run time.
    Variable "qry_stmt" contains the query to be returned, so that result set for that query will be displayed in the report.
    If I hard code the table name(rather that passing it through bind variable) in the
    qry_stmt string, Im getting the result sets for that query. But if I pass through
    bind variable at run time, its still generating the string correctly( im printing
    using a print statement at line number 14). But its returing the following report
    error
    report error:
    ORA-01403: no data found
    Please advice/help me in this.....
    declare
    qry_stmt varchar2(1000);
    p_table varchar2(30) := 'EMP';
    P_ENAME varchar2(1000);
    begin
    IF :p2_TABLE_NAMES IS NOT NULL THEN
    qry_stmt := 'select * from '||TRIM(:P2_TABLE_NAMES); -- Line Num 9
    execute immediate qry_stmt; --into P_ENAME;
    ELSE
    qry_stmt := 'SELECT 1 FROM dual ';
    END IF;
    htp.p(qry_stmt);--Line Num 14
    return qry_stmt;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    NULL;
    end;
    Thanks and Regards,
    Ramky

  • Performance for join 9 custom table with native SQL ?

    Hi Expert,
    I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.
    The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.
    SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
                mst.werks, ....................................
    FROM
                sapsr3.zab_info mst,
                sapsr3.zab_pc pg,
                sapsr3.zab_rc rg,
                sapsr3.zab_pc ps,
                sapsr3.zab_rc rs,
                sapsr3.zab_g_pc dpg,
                sapsr3.zab_g_rc drg,
                sapsr3.zab_s_pc dps,
                sapsr3.zab_s_rc drs
            WHERE mst.zseq_no = :p_rep_run_id
            AND mst.werks = :p_werks
            AND mst.mandt = rg.mandt(+)
            AND mst.ekorg = rg.ekorg(+)
            AND mst.lifnr = rg.lifnr(+)
            AND mst.matnr = rg.matnr(+)
            ...............................................   unitl all table (9 tables)
            AND ps.mandt = dps.mandt(+)
            AND ps.knumh = dps.knumh(+)
            AND ps.zseq_no = dps.zseq_no(+)
            AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) <> 0
    It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ?
    Please advise
    Thank You and Best Regards

    you can only argue coming from measurements and that is not the case.
    Coming from the code, I see only that you do not understand it at all, so better leave it as it is. It is not a hash table, but a hash join on these table.

  • Using a Variable for Table Name  with a cursor

    Hello All
    Is it possible to use a Parameter passed to a procedure as the table name
    in a cursor selection statment. I thought the below would work but I get
    a error. Does anyone have any ideas?? The Error is listed below to.
    Here's the code I just complied
    CREATE OR REPLACE PROCEDURE Dup_Add(NEWQATABLE IN VARCHAR2) IS
    CURSOR c1 IS SELECT MUNI,PROV FROM NEWQATABLE GROUP BY MUNI, PROV;
    c1rec c1%ROWTYPE;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO c1rec;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(c1rec.MUNI);
    END LOOP;
    CLOSE c1;
    END;
    Here is the errors
    LINE/COL ERROR
    3/8 PLS-00341: declaration of cursor 'C1' is incomplete or malformed
    3/15 PL/SQL: SQL Statement ignored
    3/38 PLS-00201: identifier 'NEWQATABLE' must be declared
    5/7 PL/SQL: Item ignored
    10/3 PL/SQL: SQL Statement ignored
    10/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    12/3 PL/SQL: Statement ignored
    12/24 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    LINE/COL ERROR
    Thanks
    Peter

    If you are going to have a table name or a column name as a parameter, then you have to open the cursor dynamically. The following example uses Native Dynamic SQL (NDS) to open a ref cursor dynamically. I also eliminated the group by clause, since it is intended for use with aggregate functions and you weren't using an aggregate function. Also notice that there are some other differences in terms of defining variables and fetching and so forth.
    SQL> CREATE TABLE test_table
      2  AS
      3  SELECT deptno AS muni,
      4         dname  AS prov
      5  FROM   dept
      6  /
    Table created.
    SQL> CREATE OR REPLACE PROCEDURE Dup_Add
      2    (newqatable IN VARCHAR2)
      3  IS
      4    TYPE cursor_type IS REF CURSOR;
      5    c1 cursor_type;
      6    c1muni NUMBER;
      7    c1prov VARCHAR2 (20);
      8  BEGIN
      9    OPEN c1 FOR 'SELECT muni, prov FROM ' || newqatable;
    10    LOOP
    11      FETCH c1 INTO c1muni, c1prov;
    12      EXIT WHEN c1%NOTFOUND;
    13      DBMS_OUTPUT.PUT_LINE (c1muni || ' ' || c1prov);
    14    END LOOP;
    15    CLOSE c1;
    16  END;
    17  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> SET SERVEROUTPUT ON
    SQL> EXECUTE dup_add ('test_table')
    10 ACCOUNTING
    20 RESEARCH
    30 SALES
    40 OPERATIONS
    PL/SQL procedure successfully completed.

Maybe you are looking for

  • Powerbook G4 keeps sleeping.

    Help! I am having the same sleep issue as many have posted. It started without warning yesterday. Powerbook goes to sleep whether plugged in or not. Can happen 5 minutes after start-up, then repeatedly thereafter. Checked the console application, sea

  • Po Related Queries

    Hello everybody, At the time of Creating PO (ME21N) , I want only pending PR list should be displayed, but its showing entire PR's. How to deactive the Processed PR's. Thanks

  • Specifying multiple books in WS2 web services query

    Hi, I am wondering if anybody has managed to use web services to query data and restrain by more than 1 book of business. According Oracle Support this can be done though the use of searchspec to determine the Book. I have tried this with no success

  • Drag and Drop FileBrowse​r

    I would like to select files from a FileBrowser Tree window (filebrowser.fp) by the Drag -n- Drop method in my GUI. I want to drag a file in the filebrowser, to pull it over a Textbox, and to drop it, so the path and/or the filename appears in the Te

  • Adobe Download Manager fails when I try to download Photoshop CC! HELP

    I have tried everything, restarting my computer, refreshing the browser, creating new users on my computer, re-installing adobe flash, deleting my cookies, etc!!! Nothing is working!!!! Please help. I have been paying for my Photoshop membership for