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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.