470,581 Members | 2,427 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

Stored Procedure

Hi all

Can someone help me with the syntax to my stored procedure? Every time
I try to run it I receive the error code 1064. I checked my syntax
against the documentation on mysql.com and it seems to be correct, but
of course I could be wrong. Here's my SP:

delimiter |

CREATE PROCEDURE `Universal`.`InsertCustomer`
(IN _Name varchar, IN _Address varchar,
IN _Username varchar, IN _Password varchar,
IN _Email varchar, IN _Telephone int,
IN _Newsletter tinyint, IN _PersonalData tinyint,
IN _Profession varchar, IN _LanguageID int,
IN _DateOfBirth date, IN _City varchar,
IN _CountryID int, IN _FiscalNumber varchar)
BEGIN

INSERT INTO Customers ( Name, Address,
PostalCode, Username,
Password, Email,
Telephone, Newsletter,
PersonalData, Profession,
LanguageID, CreationDate,
DateOfBirth, City,
CountryID, FiscalNumber)

VALUES (_Name, _Address,
_PostalCode, _Username,
_Password, _Email,
_Telephone, _Newsletter,
_PersonalData, _Profession,
_LanguageID, CURDATE(),
_DateOfBirth, _City,
_CountryID, _FiscalNumber)

END|
;
This is my error:
Error Code : 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 ' IN
_Address varchar,
IN _Username varchar, IN _Password varchar,
IN _Email ' at line 2
(16 ms taken)

Apr 24 '06 #1
1 2451
Hieronimus wrote:
CREATE PROCEDURE `Universal`.`InsertCustomer`
(IN _Name varchar, IN _Address varchar, .... Error Code : 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 ' IN
_Address varchar,
IN _Username varchar, IN _Password varchar,


You have to specify a length with VARCHAR.
For example, VARCHAR(30).

Regards,
Bill K.
Apr 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Rhino | last post: by
8 posts views Thread by Thomasb | last post: by
2 posts views Thread by Dino L. | last post: by
3 posts views Thread by kd | last post: by
2 posts views Thread by jed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.