dbTalk Databases Forums  

DTS stops execution of sql proc when encounter message 3604

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS stops execution of sql proc when encounter message 3604 in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LiLy
 
Posts: n/a

Default 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
during insert.
When this proc is executed from DTS, it terminates abnormally with the same
message 3604.
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.
--
Lily

Reply With Quote
  #2  
Old   
Norman Kelm
 
Posts: n/a

Default Re: DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 06:04 AM






Lily,

Not sure how to catch that error and stop it, but another method to find
dups is:

SELECT keyColumn(s) , COUNT(*)
FROM theTable
GROUP BY
keyColumns(s)
HAVING COUNT(*) > 1

Check the @@ROWCOUNT after running that.

Norman

get DTS Package Search at http://www.gerasus.com/

LiLy wrote:
Quote:
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
during insert.
When this proc is executed from DTS, it terminates abnormally with the same
message 3604.
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.

Reply With Quote
  #3  
Old   
LiLy
 
Posts: n/a

Default 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
following rows:

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?
---
Lily


"Norman Kelm" wrote:

Quote:
Lily,

Not sure how to catch that error and stop it, but another method to find
dups is:

SELECT keyColumn(s) , COUNT(*)
FROM theTable
GROUP BY
keyColumns(s)
HAVING COUNT(*) > 1

Check the @@ROWCOUNT after running that.

Norman

get DTS Package Search at http://www.gerasus.com/

LiLy wrote:
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
during insert.
When this proc is executed from DTS, it terminates abnormally with the same
message 3604.
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.


Reply With Quote
  #4  
Old   
Khwaja Arshaduddin
 
Posts: n/a

Default Re: DTS stops execution of sql proc when encounter message 3604 - 11-15-2006 , 08:07 AM



hi lily
other than these columns do u have any columns like GUID or createdate col.
Khwaja Arshaduddin

"LiLy" wrote:

Quote:
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
following rows:

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?
---
Lily


"Norman Kelm" wrote:

Lily,

Not sure how to catch that error and stop it, but another method to find
dups is:

SELECT keyColumn(s) , COUNT(*)
FROM theTable
GROUP BY
keyColumns(s)
HAVING COUNT(*) > 1

Check the @@ROWCOUNT after running that.

Norman

get DTS Package Search at http://www.gerasus.com/

LiLy wrote:
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
during insert.
When this proc is executed from DTS, it terminates abnormally with the same
message 3604.
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.


Reply With Quote
  #5  
Old   
LiLy
 
Posts: n/a

Default Re: DTS stops execution of sql proc when encounter message 3604 - 11-18-2006 , 05:44 AM



Hi Khwaja,
Unfortunately I don't have any other columns like GUID or CreateDate.
--
Lily


"Khwaja Arshaduddin" wrote:

Quote:
hi lily
other than these columns do u have any columns like GUID or createdate col.
Khwaja Arshaduddin

"LiLy" wrote:

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
following rows:

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?
---
Lily


"Norman Kelm" wrote:

Lily,

Not sure how to catch that error and stop it, but another method to find
dups is:

SELECT keyColumn(s) , COUNT(*)
FROM theTable
GROUP BY
keyColumns(s)
HAVING COUNT(*) > 1

Check the @@ROWCOUNT after running that.

Norman

get DTS Package Search at http://www.gerasus.com/

LiLy wrote:
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
during insert.
When this proc is executed from DTS, it terminates abnormally with the same
message 3604.
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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.