Bug #51964 [Fbk->NoF]: mssql_query "Query Processor Error"
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:18 +0000 |
| Subject: | Bug #51964 [Fbk->NoF]: mssql_query "Query Processor Error" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176857@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51964&edit=1
ID: 51964
Updated by: php-bugs@lists.php.net
Reported by: ovendrell at oip dot jazztel dot es
Summary: mssql_query "Query Processor Error"
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MSSQL related
Operating System: Ubuntu
PHP Version: 5.3.2
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-08-19 10:10:14] kalle@php.net
Hi
Are you using SQL Server 2000? Have you tried this work-a-around if so:
http://support.microsoft.com/kb/841404
For SQL Server 2005, I see there is an open bug at Microsoft Connect for this error:
https://connect.microsoft.com/SQLServer/feedback/details/228950
------------------------------------------------------------------------
[2010-06-04 10:47:56] ovendrell at oip dot jazztel dot es
I have more information about the problem.
I have seen that the error occurs when you insert a record into the table EEES_AprenAssigPE. This
table has a FK composed by 2 fields (IdPlaEst, CodiRes) to another table where CodiRes is a
calculated field. If you delete the FK, the problem disappears.
------------------------------------------------------------------------
[2010-06-01 11:57:25] ovendrell at oip dot jazztel dot es
Description:
------------
I generate a SQL statement dynamically in PHP script.
When I execute this SQL query, the system crash with error "Query Processor Error: The query
processor could not produce a query plan".
If I execute the same query directly on SQL server, it works.
The SQL string is:
$sql = "BEGIN TRY
BEGIN TRANSACTION
DELETE FROM EEES_AprenAssigPE WHERE IdAssig like '200166' AND Curs=2009;
INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01',
'200166', 'C2', 2009);
INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01',
'200166', 'E23', 2009);
INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01',
'200166', 'E23.7', 2009);
SELECT 1 AS OK;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
SELECT -1 AS OK;
ROLLBACK TRANSACTION;
END CATCH";
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51964&edit=1