elis Posted September 17, 2008 Share Posted September 17, 2008 CREATE PROCEDURE modifyCandidates( IN _fname VARCHAR(30), IN _lname VARCHAR(30), IN _writeup TEXT, IN _resume_text TEXT, IN _notes TEXT, IN _resume_doc MEDIUMBLOB, IN _resume_filetype VARCHAR(30), IN _resume_filename VARCHAR(60), IN _recruiter_id INT, IN _email VARCHAR(80), IN _phone VARCHAR(30), IN _address VARCHAR(200), IN _source_id INT, IN _clarity INT, IN _personability INT, IN _year_began INT ) BEGIN DECLARE lid INT; INSERT INTO candidates_info (fname, lname, recruiter_id, date_created, email, phone, source_id, clarity, personability, year_began) VALUES (_fname, _lname, _recruiter_id, NOW(), _email, _phone, _address, _source_id, _clarity, _personability, _year_began); SELECT LAST_INSERT_ID() INTO lid; INSERT INTO candidates_data (candidate_id, writeup, notes, resume_text) VALUES (lid, _writeup, _notes, _resume_text); IF _resume_doc IS NOT NULL THEN INSERT INTO candidateResumes (candidate_id, resume_doc, resume_filetype, resume_filename) VALUES (lid, _resume_doc, _resume_filetype, _resume_filename); END IF; SELECT lid; END Receives this error from MYSQL: 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 2 I must be denser than I thought as I've spent the past hour searching for my mistake and I can't say that I see anything wrong. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 17, 2008 Share Posted September 17, 2008 You're missing a semicolon: IN _year_began INT ); Quote Link to comment Share on other sites More sharing options...
elis Posted September 19, 2008 Author Share Posted September 19, 2008 I see, thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.