Author |
Topic |
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2006-12-14 : 10:02:02
|
I just can't figure out what's causing this. Does anybody know where this comes from???? |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-12-14 : 10:17:52
|
Based on the detailed information that you supplied, my guess would be that it comes from a computer.CODO ERGO SUM |
|
|
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2006-12-14 : 14:04:32
|
What do you mean "from a computer"? |
|
|
JoeNak
Constraint Violating Yak Guru
292 Posts |
Posted - 2006-12-14 : 14:19:59
|
He means you need to post more detailed information. |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-12-14 : 14:31:23
|
some code probably tried to dereference a null pointer somewhere. more than that is hard to say. http://www.elsasoft.org |
|
|
KenW
Constraint Violating Yak Guru
391 Posts |
Posted - 2006-12-14 : 15:33:33
|
Duplicate message:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76356 |
|
|
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2006-12-15 : 13:22:42
|
Is this detail enough?DECLARE @NLCREFIAVG TABLE (CASENUMBER VARCHAR(20),LASTNAME VARCHAR(50),UAC VARCHAR(20),DAYS INT,LONG INT,TOPROCESSING DATETIME,PRECLOSING DATETIME,SOC INT,PURPOSE VARCHAR(20),LOANPLAN VARCHAR(50),RE008COND VARCHAR(20),RE008SEQ INT,RE008STATUS VARCHAR(5),RE008DTCOMPL DATETIME,BUILDER VARCHAR(30),PROPSTATUS VARCHAR(20))INSERT INTO @NLCREFIAVGSELECT DISTINCT L.CASENO, L.BORROWERLASTNAME, L.UAC, CASE WHEN RE008.STATUS NOT IN ('wav','clr') THEN DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) WHEN RE008.STATUS = 'clr' THEN DATEDIFF(D,DATESENTTOPROCESSING,RE008.DATECOMPLETED) WHEN RE008.STATUS IS NULL THEN DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) WHEN RT.ROUTED IS NULL THEN DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) ELSE DATEDIFF (D,RT.ROUTED,L.DATESENTTOPRECLOSING) END AS DAYS, CASE WHEN (RE008.STATUS NOT IN ('wav','clr') AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RE008.STATUS IN ('clr') AND DATEDIFF(D,L.DATESENTTOPROCESSING,RE008.DATECOMPLETED) > 30) THEN 1 WHEN (RE008.STATUS IN ('clr') AND DATEDIFF(D,L.DATESENTTOPROCESSING,RE008.DATECOMPLETED) < 31) THEN 0 WHEN (RE008.STATUS IN ('wav') AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RE008.STATUS IN ('wav') AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) < 31) THEN 0 WHEN (RE008.STATUS IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RE008.STATUS IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) < 31) THEN 0 WHEN (RT.ROUTED IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RT.ROUTED IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) < 31) THEN 0 WHEN (RT.ROUTED IS NOT NULL AND DATEDIFF(D,RT.ROUTED,L.DATESENTTOCLOSING) > 30) THEN 1 END AS LONG, L.DATESENTTOPROCESSING, CASE WHEN RE008.STATUS = 'clr' THEN RE008.DATECOMPLETED ELSE L.DATESENTTOPRECLOSING END AS [PRECLOSING], L.SOC, L.LOANPURPOSE, L.LOANPLAN, RE008.TRACKINGCONDITION, RE008.TRACKINGSEQUENCE, RE008.STATUS, RE008.DATECOMPLETED, L.BUILDERNAME, L2.PROPERTYSTATUSFROM TEST.DBO.TBLCLOSERLOANS L (NOLOCK)LEFT JOIN TEST.DBO.TBLCLOSERLOANS2 L2 (NOLOCK)ON L.CASENO = L2.CASENOLEFT JOIN (SELECT CASENO, TRACKINGCONDITION, TRACKINGSEQUENCE, STATUS, DATECOMPLETED FROM TEST.DBO.ITEMTRAK RE008 (NOLOCK) WHERE TRACKINGCONDITION = 'RE' AND TRACKINGSEQUENCE = '008') RE008ON L.CASENO = RE008.CASENOLEFT JOIN (SELECT DISTINCT CASENO, SOC, MAX(ISNULL(ROUTEDON,0)) AS ROUTED FROM TEST.dbo.tblCaseRoutingHistoryStatic WHERE SUBSTAGE IN ('03','04') GROUP BY CASENO, SOC) RTON L.CASENO = RT.CASENOWHERE (l.borrowerlastname not like 'test' and l.borrowerlastname not like 'sample%' and l.borrowerlastname not like 'public%' and l.borrowerlastname not like 'fistimer%' and l.borrowerlastname not like 'customer%' and l.borrowerlastname not like 'credco' and l.borrowerlastname not like 'test' and l.borrowerlastname not like 'none' and l.borrowerlastname not like 'case' and l.borrowerlastname not like 'america' and l.borrowerlastname not like 'peoples')AND L.UAC NOT LIKE 'r%' AND L.UAC NOT LIKE 'c%' AND L.UAC NOT LIKE 'p%'AND L.UAC NOT LIKE 't%' AND L.UAC NOT LIKE 'w%'AND L.SOC BETWEEN 5 AND 8AND L.LOANPURPOSE IN ('r','c')AND L.PARCODE NOT LIKE '3%'AND L.BUILDERNAME = ''AND L2.PROPERTYSTATUS <> 'c'AND CASE WHEN RE008.STATUS = 'clr' THEN RE008.DATECOMPLETED ELSE L.DATESENTTOPRECLOSING END BETWEEN CONVERT(SMALLDATETIME,CONVERT(VARCHAR,GETDATE()-10,101)) AND CONVERT(SMALLDATETIME,CONVERT(VARCHAR,GETDATE()-4,101))GROUP BY L.CASENO, L.BORROWERLASTNAME, L.UAC, L.DATESENTTOPROCESSING, L.DATESENTTOPRECLOSING, L.DATESENTTOCLOSING, L.SOC, L.LOANPURPOSE, L.LOANPLAN, RE008.TRACKINGCONDITION, RE008.TRACKINGSEQUENCE, RE008.STATUS, RE008.DATECOMPLETED, L.BUILDERNAME, L2.PROPERTYSTATUS, L.PARCODE, RT.ROUTEDORDER BY L.CASENO ASC--SELECT * FROM @NLCREFIAVG----------------------------------------------- Avg NLC Refinance ------------------------------------------*****************************************************************---- RECEIPT TO COMMITMENT - NLC PURCHASE AVERAGES ----*****************************************************************--DECLARE @NLCPURCHAVG TABLE (CASENUMBER VARCHAR(20),LASTNAME VARCHAR(20),UAC VARCHAR(20),ROUTED DATETIME,DAYS INT,LONG INT,TOPROCESSING DATETIME,TOPRECLOSING DATETIME,SOC INT,PURPOSE VARCHAR(20),LOANPLAN VARCHAR(50),BUILDER VARCHAR(50),PROPSTATUS VARCHAR(20))INSERT INTO @NLCPURCHAVGSELECT DISTINCT L.CASENO, L.BORROWERLASTNAME, L.UAC, RT.ROUTED, CASE WHEN RT.ROUTED IS NULL THEN DATEDIFF (D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) ELSE DATEDIFF (D,RT.ROUTED,L.DATESENTTOPRECLOSING) END AS DAYS, CASE WHEN (RT.ROUTED IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RT.ROUTED IS NULL AND DATEDIFF(D,L.DATESENTTOPROCESSING,L.DATESENTTOPRECLOSING) < 31) THEN 0 WHEN (RT.ROUTED IS NOT NULL AND DATEDIFF(D,RT.ROUTED,L.DATESENTTOPRECLOSING) > 30) THEN 1 WHEN (RT.ROUTED IS NOT NULL AND DATEDIFF(D,RT.ROUTED,L.DATESENTTOPRECLOSING) < 31) THEN 0 END AS LONG, L.DATESENTTOPROCESSING, L.DATESENTTOPRECLOSING, L.SOC, L.LOANPURPOSE, L.LOANPLAN, L.BUILDERNAME, L2.PROPERTYSTATUSFROM TEST.DBO.TBLCLOSERLOANS L (NOLOCK)LEFT JOIN TEST.DBO.TBLCLOSERLOANS2 L2 (NOLOCK)ON L.CASENO = L2.CASENOLEFT JOIN (SELECT DISTINCT CASENO, SOC, MAX(ISNULL(CONVERT(SMALLDATETIME,CONVERT(VARCHAR,ROUTEDON,101)),0)) AS ROUTED FROM TEST.dbo.tblCaseRoutingHistoryStatic WHERE SUBSTAGE IN ('03','04') GROUP BY CASENO, SOC) RTON L.CASENO = RT.CASENOWHERE (l.borrowerlastname not like 'test' and l.borrowerlastname not like 'sample%' and l.borrowerlastname not like 'public%' and l.borrowerlastname not like 'fistimer%' and l.borrowerlastname not like 'customer%' and l.borrowerlastname not like 'credco' and l.borrowerlastname not like 'test' and l.borrowerlastname not like 'none' and l.borrowerlastname not like 'case' and l.borrowerlastname not like 'america' and l.borrowerlastname not like 'peoples')AND L.UAC NOT LIKE 'r%' AND L.UAC NOT LIKE 'c%' AND L.UAC NOT LIKE 'p%'AND L.UAC NOT LIKE 't%' AND L.UAC NOT LIKE 'w%'AND L.SOC BETWEEN 5 AND 8AND L.LOANPURPOSE IN ('p')AND L.PARCODE NOT LIKE '3%'AND L.BUILDERNAME = ''AND L2.PROPERTYSTATUS <> 'c'AND L.DATESENTTOPRECLOSING BETWEEN CONVERT(SMALLDATETIME,CONVERT(VARCHAR,GETDATE()-10,101)) AND CONVERT(SMALLDATETIME,CONVERT(VARCHAR,GETDATE()-4,101))GROUP BY L.CASENO, L.BORROWERLASTNAME, L.UAC, L.DATESENTTOPROCESSING, L.DATESENTTOPRECLOSING, L.DATESENTTOCLOSING, L.SOC, L.LOANPURPOSE, L.LOANPLAN, L.BUILDERNAME, L2.PROPERTYSTATUS, L.PARCODE, RT.ROUTEDORDER BY L.CASENO ASCSELECT 0 as AvgFIRefi, 0 as AvgFIPurch, AvgNLCRefi, AvgNLCPurchase, 0 as Avg2ndsFROM(selectCAST(AVG(CAST(DAYS AS DECIMAL)) AS DECIMAL (5,2)) As AvgNLCRefifrom @NLCREFIAVG)REFIAVGCROSS JOIN(select CAST(AVG(CAST(DAYS AS DECIMAL)) AS DECIMAL (5,2)) As AvgNLCPurchasefrom@NLCPURCHAVG) PURCHAVG |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-12-15 : 14:08:21
|
You are getting an 'Invalid Pointer' message from a SQL query? That seems unlikely.Which on of the SQL statements in the script is producing that message?CODO ERGO SUM |
|
|
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2006-12-15 : 14:52:15
|
When I run the code in Query Analyzer it runs successfully and gives me the averages, but when I paste into a DTS step and run it, it comes back w/ that error. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-12-15 : 15:26:03
|
OK, so there is no problem with the SQL.Do you know what type of DTS step it is?CODO ERGO SUM |
|
|
|
|
|