December 21, 2008 at 3:46 am
Hi,
I have a SQL Server 2005 database in which a DTS package is scheduleded.
It is failing continuously with the following error.
*********************************************
Step Error Source: Microsoft OLE DB Provider for SQL Server
Step Error Description:[DBNETLIB][ConnectionRead (recv()).]General network error. Check your network documentation.
Step Error code: 80004005
Step Error Help File:
Step Error Help Context ID:0
*********************************************
Please find below the part of the code that is executed in this step..
DELETE FROM DBO.JV_NOTES_LATEST
--INSERT INTO DBO.JV_NOTES_LATEST
SELECT CUSTOMER_ID,ACC_NO,INV_NO,SOURCE_SYS_ID,NOTE_TYPE,MAX(CREATE_DATE) AS LATEST_DATE
FROM JV_NOTES
WHERE
dateadd(dd,dateDiff(dd,0,create_date),0) <=
dateadd(dd,dateDiff(dd,0,getdate()),0)
AND NOTE_TYPE IN (3)
GROUP BY CUSTOMER_ID,ACC_NO,INV_NO,SOURCE_SYS_ID,NOTE_TYPE
UNION
SELECT CUSTOMER_ID,ACC_NO,INV_NO,SOURCE_SYS_ID,NOTE_TYPE,MAX(CREATE_DATE) AS LATEST_DATE
FROM JV_NOTES N
WHERE
NOTE_TYPE IN (2) AND
dateadd(dd,dateDiff(dd,0,create_date),0) <= dateadd(dd,dateDiff(dd,0,getdate()),0)
AND NOT EXISTS(
SELECT '1' FROM JV_NOTES T
WHERE NOTE_TYPE IN (3) AND CUSTOMER_ID IS NOT NULL
AND ACC_NO IS NOT NULL AND INV_NO IS NOT NULL
AND N.CUSTOMER_ID+N.ACC_NO+N.INV_NO+N.SOURCE_SYS_ID= T.CUSTOMER_ID+T.ACC_NO+T.INV_NO+T.SOURCE_SYS_ID
)
GROUP BY CUSTOMER_ID,ACC_NO,INV_NO,SOURCE_SYS_ID,NOTE_TYPE
*********************************************
Regards
Ahamed Rashvi
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply