Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm new to mysql i have created stored procedure but getting #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 29.I am getting error in last line.I have checked this line code checker .But it showing code looks fine.I was stucked since yesterday Please help me on this.
Thanks in advance.

What I have tried:

SQL
  create procedure InsertOrgDetails(
 IN bbnk_Name varchar(100),
 IN bbnk_Sname varchar(5),
 IN bbnk_Adrsln1 varchar(80),
 IN bbnk_Adrsln2 varchar(80),
 IN bbnk_Adrsln3 varchar(80),
 IN bbnk_Adrscty varchar(50),
 IN bbnk_Adrspin varchar(6),
 IN bbnk_Adrstate varchar(50),
 IN bbnk_Tlphn1 varchar(20))
 BEGIN
Insert into Organization(bbnk_Name,
bbnk_Sname,
bbnk_Adrsln1,
bbnk_Adrsln2,
bbnk_Adrsln3,
bbnk_Adrscty,
bbnk_Adrsp,
bbnk_Adrstate,
bbnk_Tlphn1)
VALUES(bbnk_Name,
bbnk_Sname,
bbnk_Adrsln1,
bbnk_Adrsln2,
bbnk_Adrsln3,
bbnk_Adrscty,
bbnk_Adrsp,
bbnk_Adrstate,
bbnk_Tlphn1);
END
Posted
Updated 20-Jun-17 18:45pm
v3

1 solution

Change the names of your parameters or table columns so that they don't match.
At the moment, you are doing the equivelant of saying:
SQL
INSERT INTO Tab (X) VALUES (X);
So the system can't tell what you are trying to do. You need something closer to:
SQL
INSERT INTO Tab (X) VALUES (paramX);
 
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