Jump to content

[SOLVED] Second pair of eyes? Need help spotting this procedure error


elis

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.