Click here to Skip to main content
15,912,400 members
Home / Discussions / Database
   

Database

 
AnswerRe: ms access 2007 update query? Pin
Eddy Vluggen5-Dec-13 22:26
professionalEddy Vluggen5-Dec-13 22:26 
AnswerRe: ms access 2007 update query? Pin
Dineshshp5-Dec-13 22:37
professionalDineshshp5-Dec-13 22:37 
GeneralRe: ms access 2007 update query? Pin
Jörgen Andersson5-Dec-13 22:54
professionalJörgen Andersson5-Dec-13 22:54 
QuestionINTERSECT vs SELF-JOINS Pin
Joe Woodbury5-Dec-13 12:16
professionalJoe Woodbury5-Dec-13 12:16 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Mycroft Holmes5-Dec-13 13:15
professionalMycroft Holmes5-Dec-13 13:15 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Jörgen Andersson5-Dec-13 21:31
professionalJörgen Andersson5-Dec-13 21:31 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Richard Deeming6-Dec-13 1:43
mveRichard Deeming6-Dec-13 1:43 
QuestionFUNCTION mydatabase.sp_add_new_job_order does not exists Pin
Jassim Rahma5-Dec-13 0:15
Jassim Rahma5-Dec-13 0:15 
I am getting this error:

FUNCTION mydatabase.sp_add_new_job_order does not exists

I checked on google and all were talking about spaces causing the problem but I am still unable to identify where is the problem.

Kindly help..

here is my code:

SQL
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_add_new_job_order`(IN param_customer_id int, IN param_cleaner_id int, IN param_job_order_date date, IN param_start_time time, IN param_end_time time, IN param_job_order_note text, IN param_is_contract bit, IN param_contract_id int, IN param_total_hours decimal(11,6), IN param_created_user int, OUT param_record_identity int)
BEGIN
	DECLARE param_job_order_id int;

	INSERT INTO job_orders (customer_id, cleaner_id, job_order_date, start_time, end_time, total_hours, job_order_note, is_contract, contract_id, created_date, created_user) VALUES (param_customer_id, param_cleaner_id, param_job_order_date, param_start_time, param_end_time, param_total_hours, param_job_order_note, param_is_contract, param_contract_id, NOW(), param_created_user);
	SET param_job_order_id = LAST_INSERT_ID();
	SET param_record_identity = param_job_order_id;

	UPDATE customers SET allow_delete = FALSE WHERE customer_id = param_customer_id;

	IF (param_is_contract = TRUE) THEN
	BEGIN
		UPDATE job_orders SET job_order_status = 6 WHERE job_order_id = param_job_order_id;
		UPDATE contracts SET remaining_hours = remaining_hours - param_total_hours WHERE contract_id = param_contract_id;
	END;
	END IF;
	-- add event log;
	CALL sp_add_event_log("JOBORDER", param_job_order_id, param_created_user, "Job order was created.");
	CALL sp_add_event_log("CUSTOMER", param_customer_id, param_created_user, "Job order was created.");
END



Technology News @ www.JassimRahma.com

QuestionTrouble with date selection Pin
jkirkerx4-Dec-13 11:37
professionaljkirkerx4-Dec-13 11:37 
QuestionThe conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
Member 104375991-Dec-13 8:07
Member 104375991-Dec-13 8:07 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
RedDk1-Dec-13 9:35
RedDk1-Dec-13 9:35 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
Mycroft Holmes1-Dec-13 11:59
professionalMycroft Holmes1-Dec-13 11:59 
Questionprotect my database - your advsie plz Pin
Jassim Rahma1-Dec-13 5:19
Jassim Rahma1-Dec-13 5:19 
AnswerRe: protect my database - your advsie plz Pin
GuyThiebaut1-Dec-13 23:20
professionalGuyThiebaut1-Dec-13 23:20 
GeneralRe: protect my database - your advsie plz Pin
Jassim Rahma2-Dec-13 22:30
Jassim Rahma2-Dec-13 22:30 
GeneralRe: protect my database - your advsie plz Pin
Richard Deeming3-Dec-13 1:36
mveRichard Deeming3-Dec-13 1:36 
AnswerRe: protect my database - your advsie plz Pin
Eddy Vluggen3-Dec-13 7:12
professionalEddy Vluggen3-Dec-13 7:12 
AnswerWindows Form BindingSource not saving changes in database Pin
Dean Henderson29-Nov-13 10:09
Dean Henderson29-Nov-13 10:09 
QuestionReference Pin
tsunamigang29-Nov-13 1:59
tsunamigang29-Nov-13 1:59 
AnswerRe: Reference Pin
Corporal Agarn29-Nov-13 2:06
professionalCorporal Agarn29-Nov-13 2:06 
GeneralRe: Reference Pin
tsunamigang29-Nov-13 2:12
tsunamigang29-Nov-13 2:12 
GeneralRe: Reference Pin
Chris Quinn29-Nov-13 2:41
Chris Quinn29-Nov-13 2:41 
AnswerRe: Reference Pin
Richard MacCutchan29-Nov-13 6:15
mveRichard MacCutchan29-Nov-13 6:15 
AnswerRe: Reference Pin
RedDk29-Nov-13 8:43
RedDk29-Nov-13 8:43 
Questionhow to find the return value of reader in mysql Pin
Member 1026351928-Nov-13 1:20
Member 1026351928-Nov-13 1:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.