Missing SET DEFINE OFF exporting tables

Another minor bug exporting tables using the insert option is that no “SET DEFINE OFF” is created.
If values in the exported tables contains *“&”* characters, the user is asked to edit values.
Example:
1. Create a table with such a value:
SET DEFINE OFF;
CREATE TABLE FOO (COMPANY VARCHAR2 (64));
INSERT INTO FOO VALUES ('Meier & Co');
2. Exporting this table creates:
-- Datei erstellt -Freitag-April-15-2011
-- DDL for Table FOO
CREATE TABLE "FOO"
(     "COMPANY" VARCHAR2(64)
REM INSERTING into FOO
Insert into FOO (COMPANY) values ('Meier & Co');
3. Running in SQLPlus:
SQL> @export.sql
Tabelle wurde erstellt.
Geben Sie einen Wert f³r co ein:
Regards
Marc
Version:
Java(TM)-Plattform     1.6.0_23
Oracle-IDE     3.0.04.34
Versionierungsunterstützung     3.0.04.34

Thank you. As a new SQL Developer user, I didn't know what it should have been, but I found out I needed to edit the output before I could use it to load data.
Skip

Similar Messages

  • Database copy with "set define off" option

    Is there an option to do a database copy with a "set define off" option ? I'm copying packages that contain ampersands (&) in strings and during the copy I'm being asked the value of these variables.

    Apologies for spamming this thread, but I'd like to point out a couple of additional issues regarding Database Copy:
    1) On Fedora it tries to create the script file in a system folder ( +/opt/sqldeveloper/sqldeveloper+, IIRC) which obviously doesn't work unless you are root.
    2) DDL generated for objects named like the exporting schema (for example table TEST in schema TEST) is incorrect. For example (note the missing table name):
    -- DDL for Table TEST
    CREATE TABLE
    (     "FIELD1" NUMBER,
    ) ;

  • Setting DEFINE OFF by default

    I'm finding it tedious to occasionally ambush myself with an ampersand in a query. Can DEFINE be set off by default?

    I've a sneaking suspicion that there is no resolution, at least as regards setting DEFINE OFF within a script.
    The SQL Developer Help under section "SQL*Plus Statements Supported and Not Supported in SQL Worksheet" specifies the SET command for option PAUSE OFF alone. No other SET options are listed; although "DEFINE" is listed as a command, that is the definition of a SQLPLUS variable, not the environment setting DEFINE.
    I was looking around for a Preference, but could not see anything; OTOH, it is pretty late at night so I could have missed one.
    HTH

  • 'set scan off' or 'set define off' now working through JDBC on Oracle 10g

    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection Connection c = this.init();  //create statement object Statement st = c.createStatement();  //execute statement st.execute("set scan off");
    but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.

    Rajesh Panchal wrote:
    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection
    Connection c = this.init(); 
    //create statement object
    Statement st = c.createStatement(); 
    //execute statement
    st.execute("set scan off");                              but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.These are not SQL statements but specific Oracle commands. You would invoke them from PL/SQL through the command interpreter or by using Sqlplus on the commandline; if you try to execute this in a PL/SQL query window you'll get the same error.
    So no, you are not going to invoke them from JDBC.

  • Set define off

    Hi, Everyone,
    I am using oracle 11g version on windows server 2003 R2.
    i am writing a procedure in a pacakage. My procedure is as follows:
    PROCEDURE PROC_SUBDEPT_USER_LKP
    IS
    v_command_1 VARCHAR2(30000);
    v_command_2 VARCHAR2(30000);
    v_command_3 VARCHAR2(30000);
    v_command VARCHAR2(30000);
    BEGIN
    FOR k IN
    (SELECT * from SUBDEPT_LKP
    LOOP
    V_COMMAND_1 := ' SELECT ';
    V_COMMAND_2 := ' , CUSTOMER_NO, ROWNUM NR FROM (
    SELECT DISTINCT CUSTOMER_NO
    FROM BBL_TRY_NEW A, PMM B
    WHERE A.PR_CODE = B.PR_CODE
    AND B.SUBDEPT_CODE = ';
    V_COMMAND_3 := ' AND B.SUBDEPT_DESC = ';
    V_COMMAND := ' INSERT INTO SUBDEPT_USER_LKP '||chr(10)||V_COMMAND_1||K.SUBDEPT_TN_ID||V_COMMAND_2||K.SUBDEPT_CODE||V_COMMAND_3||''''||K.SUBDEPT_DESC||''''||')';
    EXECUTE IMMEDIATE V_COMMAND;
    COMMIT;
    --DBMS_OUTPUT.PUT_LINE(V_COMMAND);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('POPULATED SUBDEPT_USER_LKP');
    END;
    for each insert statement in the loop i need to "set define off" as i have '&' symbol in my data for k.subdept_desc.
    Could anybody please help?
    Thanks in advance

    i dont think that u need to set define off, as & will not cause any issue if it is in a variable
    check my test code
    SQL> select * from test_tab;
    A
    a&b
    SQL> declare
      2  a varchar2(200);
      3  begin
      4  select a into a from test_tab where rownum = 1;
      5  execute immediate 'insert into test_tab values (''' || a || ''')';
      6  commit;
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SQL>

  • SET DEFINE OFF in Linux Operating system.

    Is "SET DEFINE OFF" will work in Linux Operating system..
    Please let me know .

    SET DEFINE OFF is an SQL*Plus tool command..
    It will work in any OS..

  • Set Define Off compiler option or similar?

    When I create a package in SQLDeveloper it starts off something like this:
    Create or replace package...
    I then save the file to my SVN folder and commit it to the repository. If I come back later and want to compile something from the repository, I browse to the file in my repository, open the file (read only) and compile. I'm getting the problem that it tries to put substitutions in (&). Is there a way to tell the compiler not to do this? Normally I'd put in something like "set define off" before the package to do this, but since it is not already there and it's read only, I can't do this...
    I tried to open a new worksheet and run "set define off" and then recompile, but it didn't do anything useful...
    Any ideas?
    Thanks

    That's weird, I'd say that should work. Sure you issued that in the same session on the same connection?
    You could also try:
    set scan offAnd run it as script (F5) and as statement (F9) just in case that makes any difference.
    Hope that helps,
    K.

  • Using SET SCAN OFF on PRO*C

    How can I implement the SQL Plus command SET SCAN OFF (or SET DEFINE OFF) on my PRO*C code? Thanks a lot.

    It is entirely likely that I'm missing something, but why would you need to? Those commands are directly related to the behavior of SQL*Plus not the SQL engine in particular.

  • Dynamic Export table of a function Module

    Hi Friends,
    I have a requirement where fields of  Export table of my function Module is dynamic. It is like the Fields to be expoerted by the Function Module would be stored in a seperate Z table
    The Z table would contain the records as follows .
    Table Name              FieldName
    =========     
    MARA                      MATNR
    MARC                      WERKS
    and So on..
    . How can I define my Export table in Function module dynamically so that the structure of my Export Function Module would be same as that of the Fieldnames in Z table..
    Thanks

    Just declare the associate type as "ANY TABLE" in the exporting parameter.
    FUNCTION ZTEST.
    *"*"Local Interface:
    *"  EXPORTING
    *"     REFERENCE(IT_TAB) TYPE  ANY TABLE

  • SQL Server set ansi_null_default off

    Hi All
    Can someone tell me the difference between having the ANSI_NULL_DEFAULT [ON/OFF]
    Ive written code below and the both create nullable columns so im very confused?
    thanks
    alter database CloseMonitoring
    set ansi_null_default off
    create table tbl_compare_off
    [id] int
    alter database CloseMonitoring
    set ansi_null_default on
    create table tbl_compare_on
    [id] int

    This is what MSDN says
    When SET ANSI_NULLS is ON, a SELECT statement that uses WHERE column_name = NULL returns zero rows even if there are null values in column_name.
    A SELECT statement that uses WHERE column_name <> NULL returns zero rows even if there are nonnull values in column_name.
    When SET ANSI_NULLS is OFF, the Equals (=) and Not Equal To (<>) comparison operators do not follow the ISO standard. A SELECT statement that uses WHEREcolumn_name = NULL returns
    the rows that have null values in column_name. A SELECT statement that uses WHERE column_name <> NULL returns
    the rows that have nonnull values in the column. Also, a SELECT statement that uses WHERE column_name <> XYZ_value returns all rows that are not XYZ_value and
    that are not NULL.
    http://technet.microsoft.com/en-us/library/ms188048.aspx
    Also SET ANSI_NULL OFF is a deprecated feature. 
     Important
    In a future version of SQL Server, ANSI_NULLS will always be ON and any applications that explicitly set the option to OFF will generate an error. Avoid using this feature in new development work,
    and plan to modify applications that currently use this feature.
    Satheesh
    My Blog

  • Using quote delimiter with define off.

    I am having issues with the the quote delimiter picking up the colon as a bind variable. For some reason when there is a tick infront of the colon it will break (ex. 2) but in (ex. 3) it is behind the colon it will work fine.
    set define off
    DECLARE
    s1 VARCHAR2(20);
    s2 VARCHAR2(20);
    s3 VARCHAR2(20);
    BEGIN
      s1 := 'Isn''t t:his cool';
      --s2 := q'{Isn't th:is cool}';
      s3 := q'{Isnt th:is co'ol}';
      dbms_output.put_line(s1);
      dbms_output.put_line(s2);
      dbms_output.put_line(s3);
    END;
    /

    @SY,
    Can you please explain the difference ?
    SQL> select  * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE    9.2.0.8.0       Production
    TNS for HPUX: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    SQL> SET define off
    SQL>
    SQL> DECLARE
      2     s1   VARCHAR2 (20);
      3     s2   VARCHAR2 (20);
      4     s3   VARCHAR2 (20);
      5  BEGIN
      6     s1 := 'Isn''t t:his cool';
      7     s2 := q'{Isn't th:is cool}';
      8     s3 := q'{Isnt th:is co'ol}';
      9     DBMS_OUTPUT.put_line (s1);
    10     DBMS_OUTPUT.put_line (s2);
    11     DBMS_OUTPUT.put_line (s3);
    12  END;
    13  /
       s2 := q'{Isn't th:is cool}';
    ERROR at line 7:
    ORA-06550: line 7, column 11:
    PLS-00103: Encountered the symbol "{Isn" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between ||
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> SET define off
    SQL>
    SQL> DECLARE
      2     s1   VARCHAR2 (20);
      3     s2   VARCHAR2 (20);
      4     s3   VARCHAR2 (20);
      5  BEGIN
      6     s1 := 'Isn''t t:his cool';
      7     s2 := q'{Isn't th:is cool}';
      8     s3 := q'{Isnt th:is co'ol}';
      9     DBMS_OUTPUT.put_line (s1);
    10     DBMS_OUTPUT.put_line (s2);
    11     DBMS_OUTPUT.put_line (s3);
    12  END;
    13  /
    Isn't t:his cool
    Isn't th:is cool
    Isnt th:is co'ol
    PL/SQL procedure successfully completed.Thanks in advance.

  • Where is my EXPORT dump file ? How to do BRTools off line table reorgan ?

    Hello,
    Here was my BRTools Export output message :
    About to export specified tables via Direct Path ...
    Current user changed to SAPPRD
    . . exporting table                          CDHDR   60357362 rows exported
    Export terminated successfully without warnings.
    BR0280I BRSPACE time stamp: 2011-08-09 16.53.04
    BR1160I 1 table exported by EXP utility
    BR0280I BRSPACE time stamp: 2011-08-09 16.53.04
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    But where is my Export dump file ?
    Besides, could you tell me the procedures of using BRTools Export & Import to do off-line table reorgan ?
    Due to some reasons, I can't do online table reorgan.

    Hi Ming,
    I noted the OSS note 646681 - Reorganizing tables with BRSPACE in my previous message, already. You don't need any additional effort such as creating script, if you use brspace as I noted in my last message.
    Stop the SAP system, but not database then execute the command, below;
    1) brspace -u / -f tbreorg -t "CDHDR"
    2) At the incoming menu steps, select --> (8 - Table reorganization mode (mode)) .. offline
    3) Then continue with "c"
    At the end of this steps, table and related indexes will be reorganized.
    You can update statistics by using the command, below after you complete the steps, above respectfully;
    brconnect -u / -c -f stats -t all -f collect -p 4
    Best regards,
    Orkun Gedik

  • While defining a columnar table, what is the purpose of column store type

    Hi folks
    I have two questions related to columnar table definition.
    1. What is the purpose of column store type.
    While defining a columnar table, what is the purpose of column store type (STRING ,CS_FIXEDSTRING,CS_INT etc) , when I define a table using the UI I see that the column is showing STRING but when I goto EXPORT SQL it does not show.  Is this mandatory or optional ?
    2.VARCHAR Vs. CHAR - In the UI when I create the table I do not see the CHAR option , but I do see lot of discussion where people are using CHAR for defining the columnar table. Not sure why UI dropdown does not show it. I also read that we should avoid using VARCHAR as those columns are not compressed, is that true, I thought the column store gives compression for all the columns. Are there certain columns which cannot be compressed .
    Please let me know where I can find more information about these two questions.
    Poonam

    Hi Poonam
    the CS_-data types are the data types that are used internally in the column store. They can be supplied but it is not at all required or recommended to do so.
    SAP HANA will automatically use the correct CS_-data type for every SQL data type in your table definitions.
    To be very clear about this: don't use the CS_-data types directly. Just stick to the SQL data types.
    Concerning VARCHAR vs CHAR: fixed character data types are not supported anymore and don't show up anymore in the documentation.
    I have no idea why you believe that VARCHAR columns are not compressed but this is just a myth.
    create column table charcompr (fchar char(20), vchar varchar(20));
    insert into charcompr (
        select lpad ('x', to_int (rand()*20), 'y'), null from objects cross join objects);
    -- same data into both columns
    update charcompr set vchar = fchar;
    -- perform the delta merge and force a compression optimization
    merge delta of charcompr;
    update charcompr with parameters ('OPTIMIZE_COMPRESSION' ='FORCE');
    -- check the memory requirements
    select COLUMN_NAME, MEMORY_SIZE_IN_TOTAL, UNCOMPRESSED_SIZE, COUNT, DISTINCT_COUNT, COMPRESSION_TYPE
    from m_cs_columns where table_name ='CHARCOMPR'
    COLUMN_NAME    MEMORY_SIZE_IN_TOTAL    UNCOMPRESSED_SIZE   COUNT   DISTINCT_COUNT  COMPRESSION_TYPE
    FCHAR       3661                    70285738            6692569 20              RLE
    VCHAR       3661                    70285738            6692569 20              RLE
    We see: compression and memory requirements are the same for both fixed and variable character sizes.
    - Lars

  • How do I set the Checkbox Export value to numeric?

    I am attemting to analyze the data in my forms.  In order to do so, I am exporting the data into a spreadsheet.  There are about 50 check boxes in the form that I am tabulating.  The default export values are "Yes" and "Off".  My preferred values are 1 and 0, which greatly simplify analysis of the data.  I can set the "Yes" value to "1", but I can't find a way to set the "Off" value to "0".  As it stands, I have to go through the list and delete all "Off" values to have them work in my spreadsheet.
    How do I create a numeric value on the check box?  Is there a more graceful way of analyzing data from forms?  Am I missing something.
    Here are some recommendations.  By default, make the checkbox export 1 and 0.  When the export value for  a checkbox is set to a numeric value, set the unchecked value to 0.  Provide a place to set the export value of an unchecked checkbox.

    You can't change the default "Off" value of a check-box. Just write a macro or script to replace all the instances of "Off" with "0". Shouldn't be too complicated... Another option is to use radio-buttons and set their values to 0 and 1. Set the "0" button as selected by default and you're guaranteed to get one of those values in your output (since it's not possible to "unselect" a radio-button group).
    Feature requests can be made here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Export Table in Delimited Format

    Hi Experts
    I would like to export table into text file using delimited format (eg.. using "~" symbol). How can i do that, because i need that table data in text file for another process.
    Can you help me please....

    Common SQL*Plus settingd for spooling:
    SET TERM OFF
    SET LINESIZE 148
    SET TRIMS ON
    SET HEADING OFF
    SET ECHO OFF
    SET FEEDBACK OFF
    SET PAGESIZE 0
    SET SPACE 0
    SET TIMING OFF
    SET TRIMS ON - this will trim the rightmost columns of your record.

Maybe you are looking for

  • Smartband and iPhone :(

    Dear all, I had to gave up my Xperia to iPhone (company replacement) but I really do like smartband as it is. Is there a way to pair and use it with iOS? is there any app supporting features/downloading activities? Is sony planning to introduce iOS a

  • Settlement process

    Hi experts I would like to go for brief about the settlement Process. Please explain 1. How to settle 60% to other cost objects? 2. What the industries need to follow the procedure for right periodic settlement 3. Incase in mtc order 70% work is comp

  • Firefox 29 does not close properly

    Since upgrading to Firefox 29, Firefox no longer closes properly. Error message says something like "process is running, close process or restart system". This began immediately after upgrading to Firefox 29. Running Windows 7 Professional (SP1). Fir

  • HTTPService error handling question

    When i am using HTTPService for Flex-PHP communication i set HTTPService's 'fault' property which handles error event. So basically if i have HTTPService set up like this: <mx:HTTPService id="test" url=" http://localhost/test/test.php" contentType="a

  • My iTunes doesn't have all the icons for categories,how do I get them?

    I have a new iPad with the pre loaded iTunes but along the botto where it should have all the icons such as music videos etc, mine onyhas podcasts, iTunes u and downloads. How do I get the other icons there to download music etc? Please help!