2.1 ai2 - Export using "fixed" merges the fields in the presence of null values

If you have a result set that includes NULL values and export you them to 'Fixed' format, any NULL field does not include spaces appropriate between it and the next field. Here's a test case and an example of the problem:

create table TEST_EXPORT (ID number, varchar2 (100) Field1, Field2 varchar2 (100), FIELD3 varchar2 (100));
insert into TEST_EXPORT values (1, ' line 1 - zone 1 ","line 1 - zone 2 ","line 1-3 field ');
insert into TEST_EXPORT values (2, ' line 2 - zone 1 ", null, 'line 2-3 field');
Insert into TEST_EXPORT values (3, 'line 3 - zone "line 3 - zone 2", "3 - zone 3" line 1 ");
insert into TEST_EXPORT values (4, ' line 4 - zone 1 ", null, null);
Insert in the TEST_EXPORT values (5, null, null, null);
commit;
Select * from TEST_EXPORT by id;


Then, right-click on the result set, export data, set the Clipboard

As you can see here, the NULL fields have no space after the "":

'ID' 'FIELD1', 'FIELD2' "FIELD3".
"1" "line 1 - field 1" "line 1 - field 2" "line 1 - field 3" "."
"2' ' line 2 - field 1" "" "line 2 - field 3" "". "
"3' ' line 3 - field 1" "line 3 - field 2" "line 3 - field 3" "."
"4' ' line 4 - field 1" ' ' "."
"5" """"""


Here is my version SQLDeveloper data:

Oracle SQL Developer 2.1.0.63
Version 2.1.0.63
Build a HAND - 63.10
Copyright © 2005,2009 Oracle. All rights reserved.
The IDE version: 11.1.1.2.36.55.23
Product ID: oracle.sqldeveloper
Product version: 11.1.1.63.10

Version of the component
=========     =======
Java (TM) Platform 1.6.0_11
Oracle IDE 2.1.0.63.10
Support versioning 2.1.0.63.10

Bug 9182502 - OTNFORUM: FIXED TRAINER is not EXPORT NULL COLUMNS CORRECTLY... filed and fixed

Tags: Database

Similar Questions

  • Importing data into Tables - by using the Import Wizard - Null values

    Hi all

    I would like to use the data import wizard to import data into existing intermediate tables, that are already filled with data.

    However, when you import my CSV file, while the import completes without error, all of the empty cells are filled with (null)"- is anyway to prevent this?

    For example, ColumnA contains data for lines 1-11 and 12-14 15-30 but row are empty, when you download the wizard of column rows 12-14 are wired populated "(null)". I would like to prevent this

    Thanks a lot for your help

    ROss

    Yes, it shows a (null), but there is nothing there.
    If you go to sqlplus and do a query on the table, it shows a white.

    If you want to get rid of the (null), then go to Tools - Preferences - Database - Advanced - display Null value like: remove the (null)
    You can even display a different background color when it is null if you wish.

    Michael

  • Fill with the previous 'not null' value ' Null' known values

    Hi all

    I have the following requirement to fill in missing values (null values) with the "Not null" values known previously available.

    Source of the example:

    Emp_Id Start_Dt LOC Comm Grade

    A101

    01/01/2013

    NJ4000B

    A101

    15/03/2013

    CA4800

    A101

    15/05/2013

    3500C

    A101

    25/07/2013

    2500

    A101

    20/12/2013

    NY5800A

    A101

    14/02/2013

    5000

    A101

    20/05/2014

    DC6000A

    A101

    03/06/2014

    3600C

    A102

    24/05/2013

    THE5000A

    A102

    15/12/20134300

    Expected results values in columns LOC and grades:

    Emp_Id Start_Dt LOC Comm Grade
    A101

    01/01/2013

    NJ4000BA101

    15/03/2013

    CA4800BA101

    15/05/2013

    CA3500CA101

    25/07/2013

    CA2500CA101

    20/12/2013

    NY5800AA101

    14/02/2013

    NY5000AA101

    20/05/2014

    DC6000AA101

    03/06/2014

    DC3600CA102

    24/05/2013

    THE5000AA102

    15/12/2013

    THE4300A

    Any suggestions would be helpful.

    Kind regards

    Arun

    Also, I think that this is a case of analytics. Last_value is perhaps the most appropriate function for the given task:

    Select emp_id

    start_dt

    last_value(loc ignore nulls) over (partition by emp_id arrested by start_dt) loc

    comm

    last_value(grade ignore nulls) about category (partition by emp_id arrested by start_dt)

    t

  • Throw the records with null values columns

    Hi all.

    Anyone know how to dispose of records containing null column values?

    In the target table, I have the set Null option? with "N"... then the process sqlldr load some records. I need to load all of this without the records with null column values. by result, if the field X is null then load the file.

    Kind regards.

    Published by: ASzo on 05/06/2013 12:37

    Published by: ASzo on 05/06/2013 12:38

    Published by: ASzo on 05/06/2013 12:42

    load data
    INFILE...
    in the table...
    When x! = ''
    fields completed by...
    (x ...)

  • Y at - it a script or utility that can be used to merge the data agent FxM in Foglight? (RS 2176806)

    Hi all

    -Environment:

    V5.6.4 FMS

    V5.6.2 FxM cartridge

    V5.6.5 unit of FxM

    Problem/Question:

    My client pointed out that the agent of FxM was not activated, it created a new agent of FxM under another FglAM. There are now data for the associated FxM 2 topology objects in the console Foglight.  He now sees duplicate applications for registrations in the Foglight dashboards.

    Y at - it a utility or a script available which can merge data from an agent of FxM?

    My client is interested in the subject of topology FxMApplicationResult in particular.

    Sincerely,

     

    Karen Smithwa

    Karen,

    Have you tried to get into the management of data and removing the name of FxM applications duplicate?

    David Mendoza

    Foglight Consultant

  • LOVs using cascading on the Page elements with values exceeding 4000 characters

    A few days ago, I asked a question on the community, but it turned out that there was something wrong with my account and they have removed the item, so I'll just post the solution I found here now:

    Well, I found a way to use LOVs cascading on page elements with values exceeding 4000 characters:

    Let's say I have a shuttle named P1_ORGANISATIE with "List of values" box, a dynamic LOV named "Source: lists of values Query" containing the value:

    Select NAAM as display_value, ID like return_value

    of NINEHAM

    order by 1

    If the number of records-NINEHAM is insufficient, the length of the value of P1_ORGANISATIE, which is a list of concatenated with colon separated digital ID, can exceed 4000 characters.

    Now, suppose I have a list of selection called P1_TEST that is connected through "List of values"-> "Cascading LOV Parent article (s)" with P1_ORGANISATIE, using a named LOV dynamic with "Source: lists of values Query" containing:

    Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | :'') > 0

    order by 1

    In this case, when P1_ORGANISATIE exceeds 3998 characters, you'll get an "ORA-01704: string literal too long"-error and the P1_TEST will show an element called "undefined".

    A way around this is possible because for a named LOV, you can use a "function that returns a sql query" instead of a simple sql query. In other words, we can apply in the context of PL/SQL and thus have maximum for expressions of 32767 instead of 4000 characters. In addition, it is possible to use the two APEX_UTIL. STRING_TO_TABLE and APEX_COLLECTION.

    Setting "Source: lists of query values" on the LOV appointed to P1_TEST with the following code will work:

    DECLARE

    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;

    l_qry varchar2 (32767): =.

    "Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    $1

    order by 1';

    BEGIN

    IF: P1_ORGANISATIE IS NULL

    OR LENGTH(:P1_ORGANISATIE) < = 4000

    THEN RETURN

    Replace (l_qry

    ,'$1'

    ,' where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | :'') > 0'

    );

    ON THE OTHER

    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P1_ORGANISATIE);

    APEX_COLLECTION. CREATE_OR_TRUNCATE_COLLECTION (p_collection_name = > 'ORGANISATIE_COLLECTIE');

    FOR id IN 1.l_selected.count

    LOOP

    APEX_COLLECTION.add_member (p_collection_name = > 'ORGANISATIE_COLLECTIE')

    , p_n001 = > to_number (l_selected (id))

    );

    END LOOP;

    RETURN

    Replace (l_qry

    ,'$1'

    ,'join apex_collections ON APC (APC. COLLECTION_NAME = "ORGANISATIE_COLLECTIE" AND APC. N001 = OTE.ID)"

    );

    END IF;

    END;

    Andreas Groenevelt says:

    A few days ago, I asked a question on the community, but it turned out that there was something wrong with my account and they have removed the item, so I'll just post the solution I found here now:

    Something was wrong with the whole site: AP invoice tolerance

    I don't post anything substantive until we find out what is happening.

  • Problem with regexp_substr if the string with null values between commas.

    Hi all

    My version of DB is 10.1.0.5.0
    I want to extract the string values using query below, but I am unable to provide the correct result.
    WITH t  AS ( select '123,1,3,22' col FROM DUAL
            UNION ALL
            SELECT '123,,2,1' FROM DUAL
            UNION ALL
            SELECT '5,1,2,,' FROM DUAL
            ) 
    SELECT regexp_substr(t.col,'[^,]*',1,1)
          ,regexp_substr(t.col,'[^,]*',1,2)
          ,regexp_substr(t.col,'[^,]*',1,3)
          ,regexp_substr(t.col,'[^,]*',1,4) FROM DUAL,t   ;
    My required result as below.
    123     1      3      22
    123            2       1
    5       1      2        
    Please help me to get the required result by using regular expressions.
    Thanks, Ram

    Hello

    In Oracle 10, you can do so by combining REGEXP_SUBSTR with something else like RTRIM:

    SELECT     RTRIM (REGEXP_SUBSTR (col, '[^,]*(,|$)', 1, 1), ',')     AS part_1
    ,     RTRIM (REGEXP_SUBSTR (col, '[^,]*(,|$)', 1, 2), ',')     AS part_2
    ,     RTRIM (REGEXP_SUBSTR (col, '[^,]*(,|$)', 1, 3), ',')     AS part_3
    ,     RTRIM (REGEXP_SUBSTR (col, '[^,]*(,|$)', 1, 4), ',')     AS part_4
    FROM     t
    ;
    

    Starting Oracle 11 REGEXP_SUBSTR alone can do.

    But look at the first response; regular expressions will be probably less effective than less powerful features, especially when all channels have the same number of separators.

    Published by: Frank Kulash on 29 December 2012 08:36

  • Management when the percentage getting null values

    Hi all

    I'm writing a query that gives me the account, the total number of transactions, the total number of transactions that are being matched (from the same table) and finally a percentage.

    After the documentation and brushing my knowledge of sql, this is the query.

    Select A.ACCOUNT_ID,A.TOTAL_TXN,B.TOTAL_MATCHED,(B.TOTAL_MATCHED/A.TOTAL_TXN) * 100 AS PERCENTAGE

    FROM (select account_id, count (*) bdr_transaction TOTAL_TXN

    where

    value_date = January 9, 15 '

    Account_id group) has

    LEFT JOIN

    (select account_id, count (*) bdr_transaction TOTAL_MATCHED where)

    value_date = January 9, 15 ' and

    type in (1,2)

    Account_id group) B

    ON A.ACCOUNT_ID = B.ACCOUNT_ID;

    This query gives me almost the expected output (if it takes too much time), but when the result of the B.TOTAL_MATCHED column is null the percentage is also set to null.

    Is there a way or a workaround to handle this?

    There might be another way more quick/clean, to do so.

    Thank you

    TK

    Select ACCOUNT_ID, TOTAL_TXN, TOTAL_MATCHED, (TOTAL_MATCHED / TOTAL_TXN) * 100 AS PERCENTAGE

    de)

    Select ACCOUNT_ID, count (case when type (1, 2) then 1 end) TOTAL_MATCHED, count (*) TOTAL_TXN

    of BDR_TRANSACTION

    where VALUE_DATE = January 9, 15 '

    ACCOUNT_ID group

    )

  • Add filter slot table form to show the lines with null values

    Hello

    I have a tabular presentation where we need to add a filter with two values (selection list) so that if one of the columns in a table (column1) is zero, then I need to display all records where column1 is null.

    I was wondering how do I put this in the Source of tabular forms where condition. This filter has only two values,

    All the
    NULL for the error

    So when the user selects all, then all the records in the table are shown
    If the user selects 'Value Null in error', while the records where Column1 is null will be shown

    For example
     column1        column2
                           A
                           B
          1               C
          3               D
     
    If the user selects, then

    all four files will show up. Else, only the first and the second will be returned.

    Thank you

    Hi, Ryan.

    Try a static LOV like this

    STATIC2:;,--- All ---;--- All ---
    

    and a Where clause, like this

    where column1 is null or :p1_filter like '%%'
    

    Jeff

  • Change the conditions when the parameter is null

    I am building an Apex application where the client will fill out a form to get the data. I want to know if there is a way to modify the WHERE clause based on the selections of the customer allows shaped.

    Here is the scenerio:

    The user form has 3 fields, which should all be able to be null to return all results. We will call them P10_A, P10_B and P10_C

    If the user selects a value for all three, where clause is:

    where column_a =: P10_A
    and column_b =: P10_B
    and column_c =: P10_C.

    It works correctly if the user chooses a value for everyone, but if they do not choose a value for P10_B, I need my query to edit the where clause is

    where column_a =: P10_A
    and column_c =: P10_C.

    I have not found a way to do this, so I put my question to you. Is it possible to selectively include certain parts of the place where clause based on the presence of null values?

    Hello

    You must change your where clause to something like this:

    where (column_a = :P10_A OR :P10_A IS NULL)
    and (column_b = :P10_B OR :P10_B IS NULL)
    and ( column_c = :P10_C OR :P10_C IS NULL)
    

    I hope this helps!

    --
    Paulo Vale
    http://Apex-notes.blogspot.com

  • Merge the LAYERS VISIBLE on the new layer

    a very common thing I use is merge the VISIBLE LAYERS on the new layer.

    now I know that in the config. I can add a MERGE VISIBLE button, which is the equivalent of CTRL + SHIFT + E, but I use SHIFT + CTRL + ALT + E all the time so I can combine things, but on a new layer... How can I do this?

    IM thinking that I use the Configurator, more and more, he needs a type of option so that when you add buttons and menu commands, if you could have a small check box to add additional options of CTRL or ALT or SHIFT for all orders to extend/tweak these commands Assistant... as is the seventh thing I'm wishing there was a way to unless of course I can add the code in the box "script."

    TX for any input, gg

    Quote:
    Posted by: gary greenwald
    Hello, thanks for responding.
    I tried your code so that I could send to merge the VISIBLE LAYERS as a ctl + shift + alt + e command instead of shift + ctl Edlin (so do a MERGE VISIBLE on a new layer and not simply merge down all layers), but replace the default with your code code has not changed anything , I could still see it merge all visible layers on a new layer, he just did the regular fusion...

    If you can try again and let me know if you find, id be overjoyed because I really use TMS + ctl + alt + e on each photo several times, but I never use TMS + ctl + e... TS just a matter of sending this additional order ALT in the code, thanks
    Gary

    Try this:

    var idMrgV = charIDToTypeID ("MrgV");
    var desc10 = new ActionDescriptor();
    var idDplc = charIDToTypeID ("Dplc");
    desc10.putBoolean (idDplc, true);
    executeAction (idMrgV, desc10, DialogModes.NO);

  • test for the null value to IN request (null, 'a ', ' b', 'c')

    Hello

    Oracle 10.2.0.4

    I think the following query is incorrect, in my opinion. (there is an index on the collar, but NULL values are ignored?

    SELECT COUNT (*) < table > where col in (null, 'a ', ' b', 'c')

    It works (no errors) and forth fast enough.

    However, I think the correct query would

    SELECT COUNT (*) < table > where IS NULL or neck neck ('a', 'b', 'c')

    It takes a lot of time. As I see it, he performs a table scan for part of the value NULL and use the index for the rest, as the index cannot be used for NULL values.

    I would appreicate an explanation on this matter, particularly why Oracle accepts the first query "where col in (null, 'a ', ' b', 'c')" without any problem.

    Thank you

    A null value is not equal to what whatsoever, not even another null value. This is consistent with the definition of the ANSI. For your first request is not what you think it does, even if it is not syntactically incorrect.

    The second query is correct. If you want to use an index, you must create a bitmap index (which requires Enterprise Edition licenses), because they do not include the values NULL, unlike B * tree index.

  • Returns the null value in HasMap.get ().

    Hi all.
    Just read the docs of java on hashmap and was interested in this topic the get() method:

    A NULL return value does not necessarily mean that the map contains no mapping for the key; It is also possible that the map explicitly maps the key null. The containsKey operation may be used to distinguish these two cases.

    I took in a case, which has been talked about: If the map allow nulls, returned by get() null will be just one key of the pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    sphinks wrote:
    I took in a case, which has been talked about: If the map permits null values, returned by get() null will be just a key pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    There is no second case. There is a single case, if you put a null value in a map, get() will return null. And because of that, if you need to know if a certain key is in the containsKey() worksheet should be used instead of the get() method.

  • By the way 'IS NULL' interactive report via URL

    I am currently able to pass values of an interactive report via the url filter, but how do I send a filter 'IS NULL' through the url?

    My current url is: f? p = 200:7:3244844391991414:NO:RIR:IR_PID:123

    Now, I want to add IR_BOOKED_DATE to the url and display only on the interactive report null values.

    I'm using version 3.2 of APEX

    Thank you!

    Jonathan

    Hello

    Take a look on: http://www.evernote.com/pub/sstryker58/Stews_Apex_tips#n=b5abf5b7-3ff8-48c2-8e60-a5038c14e0d5

    Replace IR_name to IRNN_name to set the 'name' is NOT NULL

    Andy

  • using % for all null values or empty including

    Hello all;

    Below is the sample data
    create table t1
    (
    ID varchar2(200),
    time_create date
    );
    
    insert into t1
        (id, time_create)
      values
        ('A', sysdate);
      
      insert into t1
        (id, time_create)
      values
        ('B', sysdate);
        
        insert into t1
        (id, time_create)
        
        
      values
        (null, sysdate);
        
    I have the below sql statement
        
        select * from t1
        where t1.id like decode(:id, 'ALL', '%', :id);
    now I have a situation where if user input is EVERYTHING, I want to get all the results, including null values or values space, how can I change the decode statement to do.

    This is the output I want below for ALL
    ID  TIME_CREATE
    A   5/23/2011 11:14:23 PM
    B   5/23/2011 11:14:24 PM
         5/23/2011  11:14:25 PM
    Any help is appreciated. Thank you.

    Maybe:

    Select * from t1
    where (: id = 'ALL')
    OR id =: id);

    Or something similar depending on

    Scott

Maybe you are looking for