DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 294787 - Last Review: November 6, 2003 - Revision: 3.2

This article was previously published under Q294787
BUG #: 352705 (SHILOH_BUGS)

SYMPTOMS

In some situations when you run either an INSERT, UPDATE, or DELETE statement with a SELECT statement that use a user defined function (UDF), the following error message may occur:
Server: Msg 8623, Level 16, State 1, Line 1
Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.

RESOLUTION

To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211  (http://support.microsoft.com/kb/290211/EN-US/ ) INF: How to Obtain the Latest SQL Server 2000 Service Pack

WORKAROUND

Alter the non-clustered primary key constraint to be a clustered primary key constraint.

STATUS

Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

MORE INFORMATION

To reproduce the error message, use this code:
INSERT test
(CaseId               
,SubCaseId            
,CaseIdleTime             
)
SELECT
sc.caseid AS CaseId,
sc.subcaseid AS SubCaseId,
convert(real,
    datediff(mi,
        dbo.udfGMTConvert(sc.SubCaseNonNotesLaborLogTime,s.GMTOffset),
        e.WarehouseEffectiveThroughTimeGMT 
    ) )
FROM 	dbo.vwcase c
JOIN 	dbo.vwsubcase sc
ON 	c.caseid = sc.caseid
JOIN    dbo.vwSource s on s.SourceId = c.SourceId
JOIN    dbo.vwWarehouseEffectiveThrough e on e.SourceId = c.SourceId
<BR/>
The constraint for the test table:<BR/>
ALTER TABLE [dbo].[test] WITH NOCHECK ADD 
	CONSTRAINT [PK_test_Fact] PRIMARY KEY NONCLUSTERED 
	(
		[CaseId],
		[SubCaseId]
	)  ON [PRIMARY] 
GO
				

APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbbug kbcodesnippet kbfix kbsqlserv2000sp1fix KB294787
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support