DATAPUMP EXPORT FAILS (for certain table names)

I have a table name (G$_EXP$) defined in a user foo.
When I try to export the table using expdp (datapump export command like utility):-
expdp foo/foo TABLES=G$_EXP$ DIRECTORY=USERDIR EXCLUDE=TRIGGER
I get the following error messages:-
_EXP: Undefined variable.
So can expdp not handle this kind of table names.
Will appreciate any comments/responses.

It's not expdp can't handle the tablename, it's your OS interprete $xxx as variables.
Try to use " to quote the tablename, or use parameter file PARFILE

Similar Messages

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

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

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

  • How to look for the Table Name

    Hi Friends,
    Sometimes we need to download the table for the desired information if the same is not available from a particular report. How to look for the table name? Is there a report or a particular feild, where we can find the name of the particular table?
    Thanks for the assistance.
    Regards

    Hi Friend,
    If you want to see the structures then go to SE11. Sometimes it happens that you cannot find the table names but only fields. In such case, if you want to find the Table names which is not available, then go to SE90.
    Abap Dictionary > Fields > Table Fields.
    Now Enter the Field name in Right Hand Side of the screen then Execute. You will see the all tables by which that Fields are used.
    Regards,
    Jigar

  • ABAP for Super Dumps: Import- & Export-Parameter for a Table in a FM

    Hello ABAP Profs,
    sorry I am BW.
    <b>Import- & Export-Parameter for a Table in and out of an Function Modul.</b>
    I want to import a table into a Function Module, change it and export it again.
    How do I have to define the Import- and Export- Parameters in the FM ?
    The table looks looks this:
    DATA: zvpshub_tab TYPE SORTED TABLE OF /bic/pzvpshub WITH UNIQUE KEY
    /bic/zvpshub objvers /bic/zvpsoursy INITIAL SIZE 0.
    Thanks a lot
    Martin Sautter

    Hi Clemens,
    <u>in SE11</u> I defined a datatype of Type Structure: ZVPSHUB_ROW.
    <u>in SE11</u> I defiend a datatype of Type Tabletype: ZVPSHUB_TAB,
    bases on Rowtype ZVPSHUB_ROW.
    <u>in SE 80</u> I creates an FM with a CHANGEING Parameter referencing ZVPSHUB_TAB:
    FUNCTION ZVP_SHUB_TAB_LOAD.
    ""Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(SHUB_TAB) TYPE  ZVPSHUB_TAB
    <u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:
    DATA:shub_tab          TYPE zvpshub_tab.
    <u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:
    DATA:shub_tab          TYPE zvpshub_tab.
    <u>in RSA1</u> in BW in the Startroutine i called the FM
    CALL FUNCTION 'ZVP_SHUB_TAB_LOAD'
        CHANGING
          shub_tab = shub_tab.
    and it works ..
    Thank You
    Martin Sautter

  • Building a data flow task, within a foreach loop for dynamic table name, but ole db source not allowing variable

    In my control flow, I set up a variable for the table name, enumerated by SMO, following the instructions from the link here:
    http://www.bidn.com/blogs/mikedavis/ssis/156/using-a-for-each-loop-on-tables-ssis
    Now, I put a data flow task inside the foreach. I selected the OLE DB connection manger for my database, set the Data access mode to "Table name or view name variable", and selected my variable name from the drop down. So far so good. When I click on OK,
    it gives me an error 0x80040E37, basically saying it can't open the rowset for "my variable", Check that the object exists in the database.
    So, I assume I won't be able to do this "that' easily, and I will need to build a "SQL command from variable" or some such thing. Any advice on how to build this Source editor to dynamically name my columns from the variable?
    Thanks in advance!
    mpleaf

    Hi mpleaf,
    Please try to set "ValidateExternalData" to False in your OLE DB Source Properties and "DelayValidation" property to TRUE, please refer to similar threads:
    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/620557d9-41bc-4a40-86d5-0a8d2f910d8c/
    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/456f2201-447c-41b3-bf27-b3ba47e6b737
    Thanks,
    Eileen
    Eileen Zhao
    TechNet Community Support

  • How to increase the max character for a table name..!!

    Hi All,
    The maximum characters that supports for the table Name is 30
    How can I increase this so that I can have table names lengthier than 30
    This is required as I was doing a conversion of the database from SQL server 2005 to Oracle 9i
    Many thanks in advance...
    Best Regards..,

    So How can I make it possible..?!!If it not possible, you cannot make it possible.
    If you can create a synonym on more than 30 char., you cannot use it on more than 30 char :
    SQL> create synonym my_very_long_synonym_name_for_emp_table for emp;
    Synonym created.
    SQL> select count(*) from my_very_long_synonym_name_for_emp_table;
    select count(*) from my_very_long_synonym_name_for_emp_table
    ERROR at line 1:
    ORA-00972: identifier is too long
    SQL> select * from user_synonyms;
    SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME
    DB_LINK
    /91b591a7_MY_VERY_LONG_SYNONYM SCOTT                          EMP
    SQL> select count(*) from "/91b591a7_MY_VERY_LONG_SYNONYM";
      COUNT(*)
            14Nicolas.

  • 11g Method -- byte[] JGeometry.store( JGeometry ) fails for certain SQL

    Hi All,
    Using the new in 11g byte[] JGeometry.store( JGeometry ) method as oppose to the traditional STRUCT JGeometry.store( JGeometry, Connection) method fails for certain SQL statements.
    It works fine for statements like this:
    UPDATE PARCELS SET GEOM = ? WHERE ID = 47;
    These statements give errors though:
    UPDATE PARCELS SET GEOM = SDO_MIGRATE.TO_CURRENT( ?, (SELECT DIMINFO FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'PARCELS' AND COLUMN_NAME = 'GEOM') ) WHERE ID = 47;
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'TO_CURRENT'
    SELECT ID, LABEL, GEOM FROM PARCELS WHERE SDO_NN( GEOM, ?, 'SDO_BATCH_SIZE=5000' ) = 'TRUE';
    ORA-29900: operator binding does not exist
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'SDO_NN'
    ? Being where I bind in the byte[] / Object as appropriate.
    So I get the above errors when using setBytes( index,  JGeometry.store( jgeom ) ); but it work when using: setObject( index,  JGeometry.store( jgeom, con ) );
    Is this a bug is known / will be fixed ?
    Thanks,
    Ronan

    Ronan,
    Typically this works fine in OC4J, but does not work in WLS or other containers since the connection type is different between.
    In OC4J, the connection is an Oracle connection which can handle these object conversions.
    We will try to improve the documentation for this to explicitly specify where this interface can be used.
    siva

  • 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]

  • Reg : Datapump export failing with ORA-31633 error

    Hi,
    I am trying to export one of the production databases (10.2.0.4.0) using datapump - backup is failing with the following error.
    [UBASE2]:/backup/exports/scripts>more /backup/exports/cron/cron_UBASE_log
    Export Start
    Sat Oct 10 10:32:00 GMT 2009
    Export: Release 10.2.0.4.0 - 64bit Production on Saturday, 10 October, 2009 10:32:00
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    ORA-31626: job does not exist
    ORA-31633: unable to create master table "SYSTEM.FULL_UBASE"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPV$FT", line 871
    ORA-00955: name is already used by an existing object
    Export End
    Sat Oct 10 10:32:01 GMT 2009
    I tried to attach to the existing job to kill that, but i am getting the below error -
    [UBASE2]:/backup/exports/scripts>expdp attach=FULL_UBASE
    Export: Release 10.2.0.4.0 - 64bit Production on Saturday, 10 October, 2009 14:31:46
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    ORA-31626: job does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.KUPV$FT", line 438
    ORA-31638: cannot attach to job FULL_UBASE for user SYS
    ORA-31632: master table "SYS.FULL_UBASE" not found, invalid, or inaccessible
    ORA-00942: table or view does not exist
    As this is critical production database please help me how to resolve this.
    Thanks in Advance.
    Raju A
    Oracle DBA.

    Hi,
    Have you verified if your DBMS_AQ environment has been corrupted? If so, then you'll have to drop and recreate a number of queue related objects all over again. Furthermore, ORA-00942 appears to be the main problem as it is a case sensitivity error. You should change the table names to UPPERCASE and then try again.
    Hope this helps.
    Regards,
    Naveed.

  • HS connection to MySQL fails for large table

    Hello,
    I have set up an HS to a MySql 3.51 dabatabe using an ODBC DNS. My Oracle box has version 10.2.0.1 running in Windows 2003 R2. MySQL version is 4.1.22 running on a different machine with the same OS.
    I completed the connection through a database link, which works fine in SQLPLUS when selecting small MySQL Tables. However, I keep getting an out of memory error when selecting certain large table from the MySQL database. Previously, I had tested the DNS and ran the same SELECT in Access and it doesn't give any error. This is the error thrown by SQLPLUS:
    SQL> select * from progressnotes@mysql_rmg where "encounterID" = 224720;
    select * from progressnotes@mysql_rmg where "encounterID" = 224720
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Generic Connectivity Using ODBC][MySQL][ODBC 3.51
        Driver][mysqld-4.1.22-community-nt]Lost connection to MySQL server during query
    (SQL State: S1T00; SQL Code: 2013)
    ORA-02063: preceding 2 lines from MYSQL_RMG
    I traced the HS connection and here is the result from the .trc file:
    Oracle Corporation --- THURSDAY JUN 12 2008 11:19:51.809
    Heterogeneous Agent Release
    10.2.0.1.0
    (0) [Generic Connectivity Using ODBC] version: 4.6.1.0.0070
    (0) connect string is: defTdpName=MYSQL_RMG;SYNTAX=(ORACLE8_HOA, BASED_ON=ORACLE8,
    (0) IDENTIFIER_QUOTE_CHAR="",
    (0) CASE_SENSITIVE=CASE_SENSITIVE_QUOTE);BINDING=<navobj><binding><datasources><da-
    (0) tasource name='MYSQL_RMG' type='ODBC'
    (0) connect='MYSQL_RMG'><driverProperties/></datasource></datasources><remoteMachi-
    (0) nes/><environment><optimizer noFlattener='true'/><misc year2000Policy='-1'
    (0) consumerApi='1' sessionBehavior='4'/><queryProcessor parserDepth='2000'
    (0) tokenSize='1000' noInsertParameterization='true'
    noThreadedReadAhead='true'
    (0) noCommandReuse='true'/></environment></binding></navobj>
    (0) ORACLE GENERIC GATEWAY Log File Started at 2008-06-12T11:19:51
    (0) hoadtab(26); Entered.
    (0) Table 1 - PROGRESSNOTES
    (0) [MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt]MySQL client ran out of
    (0) memory (SQL State: S1T00; SQL Code: 2008)
    (0) (Last message occurred 2 times)
    (0)
    (0) hoapars(15); Entered.
    (0) Sql Text is:
    (0) SELECT * FROM "PROGRESSNOTES"
    (0) [MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt]Lost connection to MySQL
    (0) server during query (SQL State: S1T00; SQL Code: 2013)
    (0) (Last message occurred 2 times)
    (0)
    (0) [A00D] Failed to open table MYSQL_RMG:PROGRESSNOTES
    (0)
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [S1000] [9013]General error in nvITrans_Commit - rc = -1. Please refer to the
    (0) log file for details.
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [S1000] [9013]General error in nvITrans_Rollback - rc = -1. Please refer to
    (0) the log file for details.
    (0) Closing log file at THU JUN 12 11:20:38 2008.
    I have read the MySQL documentation and apparently there's a "Don't Cache Result (forward only cursors)" parameter in the ODBC DNS that needs to be checked in order to cache the results in the MySQL server side instead of the Driver side, but checking that parameter doesn't work for the HS connection. Instead, the SQLPLUS session throws the following message when selecting the same large table:
    SQL> select * from progressnotes@mysql_rmg where "encounterID" = 224720;
    select * from progressnotes@mysql_rmg where "encounterID" = 224720
    ERROR at line 1:
    ORA-02068: following severe error from MYSQL_RMG
    ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.120)(PORT=1521))(CONNECT_DATA=(SID=MYSQL_RMG)))
    Curiously enough, after checking the parameter, the Access connection through the DNS ODBS seems to improve!
    Is there an aditional parameter that needs to be set up in the inithsodbc.ora perhaps? These are current HS paramters:
    # HS init parameters
    HS_FDS_CONNECT_INFO = MYSQL_RMG
    HS_FDS_TRACE_LEVEL = ON
    My SID_LIST_LISTENER entry is:
    (SID_DESC =
    (PROGRAM = HSODBC)
    (SID_NAME = MYSQL_RMG)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    Finally, here is my TNSNAMES.ORA entry for the HS connection:
    MYSQL_RMG =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.120)(PORT = 1521))
    (CONNECT_DATA =
    (SID = MYSQL_RMG)
    (HS = OK)
    Your advice will be greatly appeciated,
    Thanks,
    Luis
    Message was edited by:
    lmconsite

    First of all please be aware HSODBC V10 has been desupported and DG4ODBC should be used instead.
    The root cause the problem you describe could be related to a timeout of the ODBC driver (especially while taking care of the comment: it happens only for larger tables):
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    indicates the Driver or the DB abends the connection due to a timeout.
    Check out the wait_timeout mysql variable on the server and increase it.

  • Export fails with auto generated name containing ' || etc...

    Hi,
    If I try to export to "TEXT" from a query that has a autogenerated name containing the following:
    select 'select count(*),'||COLUMN_NAME||' from ' || table_name || ' group by ' ||COLUMN_NAME||';'
    The export fails with an ORA-00904.
    The obvious workaround is to name the select parameter as in
    select 'select count(*),'||COLUMN_NAME||' from ' || table_name || ' group by ' ||COLUMN_NAME||';' text
    But I thought I should mention it.
    Thanks,
    Orjan

    I'll pass this on for someone to look at.
    -kris

  • Wait_for_file() not working for certain file names

    Data Services Version: 12.1.1.3
    OS: Windows Server 2003.
    Hello,
    I'm using wait_for_file to poll for files in a certain directory. I've used this in the past for other projects and never had an issue until now.
    What seems to be happening is with certain file names, wait_for_file is returning a 1 (meaning at least one file found), however the file list is coming back as blank.
    For example:
    If I put a file name called cs.p.P110113CN.b.110114 in the directory, I get a blank return file list.
    If I then rename this to 110114, it works fine.
    Here's the code I'm using:
    wait_for_file($GV_InputDirectory || '*',0,0,1,$GV_InputFileName);
    $GV_InputDirectory varchar(1000)
    $GV_InputFileName varchar(100)
    Any ideas why this might be happening? Renaming the file isn't really an option as it's a standard format that we've used for years.
    Edited by: Craig Cartmell on Mar 7, 2011 11:16 AM

    Hi,
    Thanks for the reply.
    $GV_InputDirectory is set to
    wcs-dev-boweb2\c$\DebtManager\Dev\Interfaces\Bulk Payments\Agency\credit-security\Input\.
    I'm wondering if it's something to do with the length of the directory/filename combined?
    If I place a file called "110114" in there, wait_for_file() works perfectly. If I change it to "cs.p.P110113CN.b.110114", I have problems.

  • Parameterized cursor for varient Table name?

    Hi all,
    I am using Oracle 9i and have a cursor defined as :-
    Code:
    CREATE PROCEDURE Proc_Abc
    AS
    CURSOR
    My_Cursor (UserName VARCHAR) IS
    SELECT Emp_Name, Salary FROM Employee_Table
    WHERE User_Name = UserName;     
    (Rest of the code)
    This code is working perfectly, but if I try to provide the table name through the cursor variable, it gives an error
    Below is the code that I am writing to pass table name through variable:-
    Code:
    CREATE PROCEDURE Proc_Abc
    AS
    CURSOR
    My_Cursor (TableName VARCHAR, UserName VARCHAR) IS
    SELECT Emp_Name, Salary FROM TableName
    WHERE User_Name = UserName;     
    (Rest of the code)
    All the tables that I need to pass through cursor variables have the same fields and are all pre known to me, thats why "SELECT Emp_Name, Salary " is remaining common throughout.
    Please suggest how can I make a cursor with variant tables?
    Thanks in advance.

    The following procedure compares between two tables and then it picking the column from all_tab_column table and finally execute the SELECT statement to compare the data between this two table. But, you can proceed your program taking help from this -
    satyaki>ed
    Wrote file afiedt.buf
      1  create or replace procedure compr_tab_dat(TAR_TAB IN VARCHAR2,
      2                                            TAR_UID IN VARCHAR2,
      3                                            SRC_TAB IN VARCHAR2,
      4                                            SRC_UID IN VARCHAR2)
      5  is
      6   cursor c1
      7   is
      8    select column_name
      9    from (
    10           select column_name,column_id
    11           from all_tab_columns
    12           where table_name = SRC_TAB
    13           and   owner = SRC_UID
    14           intersect
    15           select column_name,column_id
    16           from all_tab_columns
    17           where table_name = TAR_TAB
    18           and   owner = TAR_UID
    19         )
    20     order by column_id;
    21   cursor c_count
    22   is
    23     select count(column_name) as c_cnt
    24     from (
    25             select column_name
    26             from all_tab_columns
    27             where table_name = SRC_TAB
    28             and   owner = SRC_UID
    29             intersect
    30             select column_name
    31             from all_tab_columns
    32             where table_name = TAR_TAB
    33             and   owner = TAR_UID
    34           );
    35   rec1 c1%rowtype;
    36   rec2 c1%rowtype;
    37   rec3 c1%rowtype;
    38   rec6 c_count%rowtype;
    39   cnt  number(10);
    40   cnt1  number(10);
    41   str  varchar2(32000);
    42   --str  clob;
    43  BEGIN
    44     cnt := 0;
    45     cnt1 := 1;
    46     dbms_output.enable(10000000);
    47     for rec6 in c_count
    48     loop
    49      cnt := rec6.c_cnt;
    50     end loop;
    51     if cnt = 0 then
    52        dbms_output.put_line('No matched columns found.... ');
    53     else
    54        dbms_output.put_line('UnMatched Datas Are-- ');
    55           str:='declare '||
    56          '  cursor c3 '||
    57          '  is '||
    58          '    select ';
    59           open c1;
    60           loop
    61             fetch c1 into rec1;
    62             exit when c1%notfound;
    63             if cnt = cnt1 then
    64                str:= str||rec1.column_name;
    65             elsif cnt1<cnt then
    66               str:= str||rec1.column_name||',';
    67             end if;
    68             cnt1 := cnt1 + 1;
    69           end loop;
    70           close c1;
    71           str:=str||' from '||SRC_TAB||
    72                ' minus '||
    73                ' select ';
    74           cnt1:=1;
    75           open c1;
    76           loop
    77             fetch c1 into rec2;
    78             exit when c1%notfound;
    79             if cnt = cnt1 then
    80                str:= str||rec2.column_name;
    81             elsif cnt1<cnt then
    82                str:= str||rec2.column_name||',';
    83             end if;
    84             cnt1 := cnt1 + 1;
    85           end loop;
    86           close c1;
    87           str:=str||' from '||TAR_TAB||';'||
    88                ' r3 c3%rowtype; '||
    89                ' begin '||
    90                '   for r3 in c3 '||
    91                '   loop '||
    92                '     dbms_output.put_line(';
    93           cnt1:=1;
    94           open c1;
    95           loop
    96             fetch c1 into rec3;
    97             exit when c1%notfound;
    98             if cnt = cnt1 then
    99                str:= str||' r3.'||rec3.column_name;
    100             elsif cnt1<cnt then
    101                str:= str||' r3.'||rec3.column_name||
    102                     '||'',''||';
    103                cnt1 := cnt1 + 1;
    104             end if;
    105           end loop;
    106           close c1;
    107           str:=str||');'||
    108                ' end loop;'||
    109                ' exception '||
    110                '   when others then '||
    111                '     dbms_output.put_line(sqlerrm); '||
    112                ' end; ';
    113     end if;
    114     execute immediate(str);
    115     --dbms_output.put_line(str);
    116  exception
    117    when others then
    118      dbms_output.put_line(sqlerrm);
    119* END;
    120  /
    Procedure created.
    satyaki>
    satyaki>
    satyaki>
    satyaki>create table emp_t
      2     as
      3       select * from emp
      4       where rownum < 5;
    Table created.
    satyaki>
    satyaki>
    satyaki>desc emp;
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    satyaki>
    satyaki>
    satyaki>desc emp_t;
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    satyaki>set lin 1000
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    satyaki>
    satyaki>
    satyaki>select * from emp_t;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
    satyaki>
    satyaki>
    satyaki>set serveroutput on
    satyaki>
    satyaki>
    satyaki>begin
      2   compr_tab_dat('EMP_T','SCOTT','EMP','SCOTT');
      3  end;
      4  /
    No matched columns found....
    ORA-06535: statement string in EXECUTE IMMEDIATE is NULL or 0 length
    PL/SQL procedure successfully completed.
    satyaki>
    satyaki>
    satyaki>sho user;
    USER is "TRG2"
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>begin
      2       compr_tab_dat('EMP_T','TRG2','EMP','TRG2');
      3     end;
      4      /
      5  .
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  begin
      2       compr_tab_dat('EMP_T','TRG2','EMP','TRG2');
      3* end;
    satyaki>/
    UnMatched Datas Are--
    7654,MARTIN,SALESMAN,7698,28-SEP-81,1250,1400,30
    7698,BLAKE,MANAGER,7839,01-MAY-81,2850,,30
    7782,CLARK,MANAGER,7839,09-JUN-81,2450,,10
    7788,SCOTT,ANALYST,7566,19-APR-87,3000,,20
    7839,KING,PRESIDENT,,17-NOV-81,5000,,10
    7844,TURNER,SALESMAN,7698,08-SEP-81,1500,0,30
    7876,ADAMS,CLERK,7788,23-MAY-87,1100,,20
    7900,JAMES,CLERK,7698,03-DEC-81,950,,30
    7902,FORD,ANALYST,7566,03-DEC-81,3000,,20
    7934,MILLER,CLERK,7782,23-JAN-82,1300,,10
    PL/SQL procedure successfully completed.N.B.: May be Any other member can come with much shorter or better technique than this one. But, according to your requirement - i'm posting it. Hope this will help you, or atleast give you some idea.
    Regards.
    Satyaki De.

  • Table for all table names.

    Hi everybody,
    I would like to know if there is any table which is maintaining all the table names in SAP as fields.
    Any code reg this is helpfull.
    Thanks.
    Regards.
    KS
    Message was edited by:
            Sanjeev k

    Hi,
    Please try FM DDIF_FIELDINFO_GET to get all fields based on table name.
    DATA: BEGIN OF I_DFIES OCCURS 0.
            INCLUDE STRUCTURE DFIES.
    DATA: END OF I_DFIES.
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
        EXPORTING
          TABNAME        = 'MARA'
        TABLES
          DFIES_TAB      = I_DFIES
        EXCEPTIONS
          NOT_FOUND      = 1
          INTERNAL_ERROR = 2
          OTHERS         = 3.
    Regards,
    Ferry Lianto

  • 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.

Maybe you are looking for

  • Frequent crashes in illustrator CS4 when performing undo

    Hello, I have two employees using two relatively new Windows Vista computers and CS4.  They have frequent crashes of illustrator when they undo too quickly, or sometimes just undoing slowly will cause a crash.  It is only these two computers that are

  • Maximize camera memory

    I want to maximze the amount of memory used for pictures and video.  Can I allocate some of the space reserved from music files? 

  • Last payroll offcycle close date/time

    Hi Experts,    i need to write a function module to determine the last payroll off cycle close date/time.Can anyone suggest as to which tables i should be using to retrieve the relevant data. Thanks

  • Regular expression in a switch case

    Hey guys, I have a string "52x + 60" and i want to extract 52x and 60 using regular expressions and a switch case Is this the right way of doing it? var equation:String = "32x + 5" var numberExract:RegExp = /\d+/ var xExtract:RegExp = /d+/x/ for(var

  • Additional search & display fields rqd for opportunities in IC Winclient

    Hi I have a requirement where i need to add additional search and display fields in the Interaction history in IC Winclient. The search and display fields are for the opportunities search in the Interaction History. As SAP standard we have,but need t