EXCEPTION_ACCESS_VIOLATION.???? wat error is this?
-
There is an error when i run my script.... wat it mean??? will be becasue my command too complicated of computer hardware problem?? actually it work at first b4 i add the COST column after add it then error comes out....Those SQL i underline which is the code i added. SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. Connection Broken
SELECT Query1.bizdate, TSuper,TSoft, THard, (TSoft+ THard+ TSuper) as TOTAL , ((TSoft+ THard+ TSuper)-(TsCost+ThCost+TsuCost))as GP FROM (SELECT bizdate, SUM(totalsales+returnamt) AS TSoft ,sum(totalcost+returncost)as TsCost FROM tot_item WHERE deptcode IN (11, 12, 13, 14, 15, 16, 17) GROUP BY bizdate) AS Query1 LEFT JOIN (SELECT bizdate, SUM(totalsales+returnamt) AS THard ,sum(totalcost+returncost)as ThCost FROM tot_item WHERE deptcode IN (21, 22, 23, 24, 25, 26, 27, 28, 29) GROUP BY bizdate) AS Query2 ON Query1.bizdate = Query2.bizdate LEFT JOIN (SELECT bizdate, sum(totalsales+returnamt) AS TSuper ,sum(totalcost+returncost)as TsuCost FROM tot_item WHERE deptcode IN (30, 40, 50, 60, 70, 80, 90) GROUP BY bizdate) AS Query3 ON Query1.bizdate = Query3.bizdate where query1.bizdate>= '2006-10-01' and query1.bizdate<= '2006-10-15' order by query1.bizdate
-
There is an error when i run my script.... wat it mean??? will be becasue my command too complicated of computer hardware problem?? actually it work at first b4 i add the COST column after add it then error comes out....Those SQL i underline which is the code i added. SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. Connection Broken
SELECT Query1.bizdate, TSuper,TSoft, THard, (TSoft+ THard+ TSuper) as TOTAL , ((TSoft+ THard+ TSuper)-(TsCost+ThCost+TsuCost))as GP FROM (SELECT bizdate, SUM(totalsales+returnamt) AS TSoft ,sum(totalcost+returncost)as TsCost FROM tot_item WHERE deptcode IN (11, 12, 13, 14, 15, 16, 17) GROUP BY bizdate) AS Query1 LEFT JOIN (SELECT bizdate, SUM(totalsales+returnamt) AS THard ,sum(totalcost+returncost)as ThCost FROM tot_item WHERE deptcode IN (21, 22, 23, 24, 25, 26, 27, 28, 29) GROUP BY bizdate) AS Query2 ON Query1.bizdate = Query2.bizdate LEFT JOIN (SELECT bizdate, sum(totalsales+returnamt) AS TSuper ,sum(totalcost+returncost)as TsuCost FROM tot_item WHERE deptcode IN (30, 40, 50, 60, 70, 80, 90) GROUP BY bizdate) AS Query3 ON Query1.bizdate = Query3.bizdate where query1.bizdate>= '2006-10-01' and query1.bizdate<= '2006-10-15' order by query1.bizdate
After creating a similar table structure and populating it with some data, your query runs fine on my laptop (Win XP SP2, SQL Server 2005 Developer Edition). You did not specify which version of SQL Server you are running. The latest service pack may be a good cure for your problem. You may want to get the actual error that occurred by reading the SQL server error log. Most of the time it is possible to get the error message in the stack dump just below the Access Violation message.
Nathan H. Omukwenyi