Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Wizard apex file upload Load only distinct values (APEX 4.1)
icon2.gif  Wizard apex file upload Load only distinct values [message #534595] Wed, 07 December 2011 11:17 Go to next message
algervis
Messages: 4
Registered: December 2011
Location: ITALY
Junior Member
I have create an application with APEX 4.1 using a DATA LOADING page to load a ASCII file like this that i put below, but insted of load 20 record it load only 4 record (the distinct of the values of the file).

It is possibile load all the 20 record and not the distinct ???

Thank you for replay !

E36NE734350BB
E36NE734350BC
E36NE734350BD
E36NE734350BF
E36NE734350BB
E36NE734350BC
E36NE734350BD
E36NE734350BF
E36NE734350BB
E36NE734350BC
E36NE734350BD
E36NE734350BF
E36NE734350BB
E36NE734350BC
E36NE734350BD
E36NE734350BF
E36NE734350BB
E36NE734350BC
E36NE734350BD
E36NE734350BF



[EDITED by LF: fixed topic title typo; was "Witzard"]

[Updated on: Thu, 08 December 2011 06:22] by Moderator

Report message to a moderator

Re: Witzard apex file upload Load only distinct values [message #534610 is a reply to message #534595] Wed, 07 December 2011 15:13 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is there, perhaps, a unique index (or a primary / unique key) on the target column?
Re: Witzard apex file upload Load only distinct values [message #534614 is a reply to message #534610] Wed, 07 December 2011 16:01 Go to previous messageGo to next message
algervis
Messages: 4
Registered: December 2011
Location: ITALY
Junior Member
No is a normal table of 1 column :

CREATE TABLE APX_LOADFILE_INVENT
(CODICE_ARTICOLO VARCHAR2(13)
);

I HAVE USED THE WIZARD OF APEX BUT MAY BE TAHT ARE NO POSSIBILITY.
VERY STRANGE THAT IN AUTOMATIC GROUP BY CODICE_ARTCOLO.

Do you Know if there is an other way to load the file ascii leaving the number of record without group ??
Re: Witzard apex file upload Load only distinct values [message #534643 is a reply to message #534614] Thu, 08 December 2011 01:53 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not an expert, but - from my point of view - everything works as expected. I believe that you made a mistake at the very first step, here:

/forum/fa/9609/0/

Wizard asks you for a table name and forces you (see the red asterisk?) to choose at least one unique column. As your table contains only one column, that is the one that you chose to be unique. Consequence is known to you - only distinct records have been loaded.

Therefore, recreate a table. For example:
CREATE TABLE APX_LOADFILE_INVENT
 (id              number,
  CODICE_ARTICOLO VARCHAR2(13)
 );

When loading data, on "Data / Table Mapping" page, choose only your CODICE_ARTICOLO column:

/forum/fa/9610/0/

Load will end successfully; when you look at the table after the records are loaded, you'll notice that the ID column is empty, but all your records (from the input file) will be there:
SQL> select * from za_load;

        ID COD
---------- -------------
           E36NE734350BB
           E36NE734350BC
           E36NE734350BD
           E36NE734350BF
           E36NE734350BB
           E36NE734350BC
           E36NE734350BD
           E36NE734350BF
           E36NE734350BB
           E36NE734350BC
           E36NE734350BD
           E36NE734350BF
           E36NE734350BB
           E36NE734350BC
           E36NE734350BD
           E36NE734350BF
           E36NE734350BB
           E36NE734350BC
           E36NE734350BD
           E36NE734350BF

20 rows selected.

SQL>


Maybe there's another workaround (instead of creating additional "dummy ID" unique column, but I don't know it.
Re: Witzard apex file upload Load only distinct values [message #534655 is a reply to message #534643] Thu, 08 December 2011 03:06 Go to previous message
algervis
Messages: 4
Registered: December 2011
Location: ITALY
Junior Member

Yes Now Work !!
Thank You a Lot !!
Previous Topic: LOV for time
Next Topic: Inserting app session into a table form
Goto Forum:
  


Current Time: Thu Mar 28 03:44:46 CDT 2024