Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to eliminate duplicates, when uploading a [b]csv[/b]?

474531Jan 5 2006 — edited Jan 5 2006
Hi! I looked at the Vikas parse_file procedure. I am suppose to load the data from the csv into a known table. My table "test" has two column: col1,col2.
I modified a little at Vikas's procedure, and now it looks so:

IF (p_table_name is not null)
THEN
htmldb_util.set_session_state('P149_DEBUG',l_ddl);
l_ddl := 'insert into test(col2,col1) '||
'select '||v(p_columns_item)||' '||
'from htmldb_collections '||
'where seq_id > 1 and collection_name='''||p_collection_name||'''';
htmldb_util.set_session_state('P149_DEBUG',v('P149_DEBUG')||'/'||l_ddl);
execute immediate l_ddl;
RETURN;
END IF;

It's ok untill now, but the problem is that user may upload 2 different files, which have same columns. And I don't want that. I'm not suppose to have duplicates. So how can I solve this problem?
Really need help...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2006
Added on Jan 5 2006
12 comments
1,416 views