MySQL Forums
Forum List  »  Stored Procedures

Failed procedure definition
Posted by: Marcel Gautreau
Date: August 21, 2013 07:56PM

The following statement gets me a plain 1064 - that's it, no elaboration, just a 1064 with a dash. I've pasted in the text below after the code.

CREATE PROCEDURE sprc_list_user_accounts
(
int_page_number INT,
int_recs_per_page INT
)
BEGIN
DECLARE int_record_first INT;
SELECT COUNT(*) FROM acs_accounts;
IF int_page_number = 0
THEN SELECT record_identifier,
name_account,
name_last,
name_first
FROM acs_accounts
WHERE flag_disabled = 0
ORDER BY name_last,
name_first;
ELSE SET int_record_first = ((int_page_number - 1) * int_recs_per_page);
SELECT name_account,
name_last,
name_first,
flag_disabled
FROM acs_accounts
ORDER BY name_last,
name_first
LIMIT int_record_first, int_recs_per_page;
END IF;
END $$


Response:
#1064 -

--------
No indication of where the syntax is wrong; I've tried running it directly from phpMyAdmin, or uploading and running the SQL statement, which are the only ways I have of accessing the server.

Options: ReplyQuote


Subject
Views
Written By
Posted
Failed procedure definition
2014
August 21, 2013 07:56PM
917
August 23, 2013 03:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.