m00n: moon (Default)
Gotta love vague and mysterious error messages.

Take MS SQL Server, for instance. I'm writing a query, and it passes the syntax check just fine. Execute the query and you get:

Server: Msg 8624, Level 16, State 21, Line 1
Internal SQL Server error.


So I go to look up more info on that error message number, and the help documentation says:

8624 - Internal SQL Server error.


How helpful.

Any SQL gurus out there? The concept of the query isn't all that complex or challenging - I'm just having a problem coming up with the actual SQL to get what I want.

Date: 2007-02-21 05:26 pm (UTC)From: [identity profile] theslice.livejournal.com
ext_167746: Slice of the City (Default)
According to Microsoft, this is an issue with SQL Server 2000 when you when it compiles a delete query that contains sub-queries that use "NOT IN" *or* you have a SELECT statement on a view that has many subqueries. Apparently, Service Pack 4 fixes it. They also claim you can try to add the OPTION (MAXDOP 1) query hint onto your query (if it's the DELETE).

http://support.microsoft.com/default.aspx/kb/885442
http://support.microsoft.com/?kbid=830466

Here's another potentially useful discussion:

http://www.tek-tips.com/viewthread.cfm?qid=1159898&page=1

Hope this helps.

Date: 2007-02-21 05:52 pm (UTC)From: [identity profile] akaashben.livejournal.com
You rock!

That discussion thread at tek-tips lead me to a MS article with a workaround that appears to be working.

I had a MAX() expression in a subquery that was part of my overall select statement, and that seems to be what was causing the error.

The query is now humming away - hopefully it will return without error and without running all day. LOL!

Thanks!

Date: 2007-02-21 07:24 pm (UTC)From: [identity profile] theslice.livejournal.com
ext_167746: Slice of the City (Default)
Ah, jolly good. Glad that worked out!

Profile

m00n: moon (Default)
m00n

May 2009

S M T W T F S
      1 2
3456789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 30th, 2025 11:21 pm
Powered by Dreamwidth Studios