DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 05:35 AM
One of the steps in my sql proc creates unique index with ignore_dup_key
option. The proc works fine in SQL analyser, although it does display message
3604 - Duplicate key ignored. I use this method to eliminate duplicate rows
When this proc is executed from DTS, it terminates abnormally with the same
Has anyone encounter this problem before and would anyone know of a work
around? apart from using another longer method to eliminate duplicate rows
such as create temporary table with identity key.
Thanking in advance.
Re: DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 06:04 AM
Not sure how to catch that error and stop it, but another method to find
SELECT keyColumn(s) , COUNT(*)
HAVING COUNT(*) > 1
Check the @@ROWCOUNT after running that.
get DTS Package Search at http://www.gerasus.com/
Re: DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 06:58 AM
Thank you Norman for your reply but I don't know how to apply your solution
to resolve the problem with duplicate rows that I am having. I like to be
able to keep 1 of the duplicate rows. For example I want to keep 1 of the
Row 1 has columns A, B, C, D, E
Row 2 has columns A, B, C, D, F
Row 3 has columns A, B, C, G, E
The keys for matching are A, B, C. Since the 3 rows above have the same keys
A, B, C, I like to keep the first row but eliminate the other 2 rows.
By grouping the keys as suggested, I can identify the duplicate rows but how
can I retain 1 of the row?
"Norman Kelm" wrote:
Re: DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 08:07 AM
other than these columns do u have any columns like GUID or createdate col.
Re: DTS stops execution of sql proc when encounter message 3604 - 11-18-2006 , 05:44 AM
Unfortunately I don't have any other columns like GUID or CreateDate.
"Khwaja Arshaduddin" wrote: