Click here to Skip to main content
15,881,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i get this error when uploading stored procedure in server
"Error

SQL query: Documentation

CREATE PROCEDURE `sp_fetch_keyinformation_type_null` ( intCoID int ) BEGIN SELECT *
FROM keyinformation
WHERE TYPE IS NULL
AND CompanyID = intCoID;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 "

please help me out...
Posted
Comments
Ahmed Bensaid 22-Jan-14 9:38am    
Maybe a problem with your quotes ...

1 solution

Try this,

CREATE PROCEDURE sp_fetch_keyinformation_type_null(IN intCoID int)
BEGIN
Select * from keyinformation where TYPE is NOT NULL and CompanyID=intCoID
END



Type is NOT NULL, because there don't exists any data with condition "NULL and CompanyID=intCoID" as it always returns 0 rows.

Hope this should work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900