Duplicate value

Database
Enthusiast

Duplicate value

All
waiting for the kind response of all friends

1- How to stop the insert of duplicate value in a table.

2- If fast load failed inserting the duplicate value in a table how this problem will be resolved.

3 REPLIES
Fan

Re: Duplicate value

hello,
If you want to stop loading duplicate values for a particular column make that column a unique primary index.
Enthusiast

Re: Duplicate value

Hi,
are you thinking about duplicate rows or duplicate PI values?

If you're thinking about duplicate rows, then you'll probably have a multiset table with a NUPI on it.
1- if you don't want to have duplicate rows in a table convert your table to set and/or put a UPI (or also a USI) on it.
2- fastload automatically discards perfectly duplicated rows. if you want to load them in a table you have to use another utility, for example multiload.

If you're thinking about duplicate values for the PI:
1- if you don't want to have duplicate values put a UPI on your table
2- using fastload it will automatically discard duplicate PI values and put them in errortable 1. have a look to the manuals.

Hope this helps,
Bye,
TDUser
Enthusiast

Re: Duplicate value

You may do a INSERT..SELECT from a MULTISET (duplicate rows) to a SET table for ignoring duplicates.

Fastload can kickout the duplicates while MLOAD has "IGNORE DUPLICATE" option which can be used.
You may want to check Load and Unload utilities manual for exact symantics.

Vinay