Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6102141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:34:48+00:00 2026-05-23T13:34:48+00:00

DELIMITER || CREATE FUNCTION InsertEvent (IN iPatientMonitoringId BIGINT, IN iTypeId SMALLINT(6), IN iChannelId SMALLINT(6),

  • 0
DELIMITER ||

CREATE FUNCTION InsertEvent (IN iPatientMonitoringId BIGINT, 
                             IN iTypeId SMALLINT(6), 
                             IN iChannelId SMALLINT(6), 
                             IN iStart TIMESTAMP, 
                             IN iEnd TIMESTAMP)
RETURNS BIGINT DETERMINISTIC

BEGIN

  INSERT INTO Event 
    (Id, PatientMonitoringId, TypeId, ChannelId, StartOcurrence, EndOcurrence)
  VALUES 
    ('', iPatientMonitoringId, iTypeId, iChannelId, iStart, iEnd);

  RETURN LAST_INSERT_ID();

END ||

DELIMITER ;

This sql query looks ok to me but I’m not understanding the error returned by phpmyadmin:

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 ‘IN iPatientMonitoringId BIGINT, IN

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:34:49+00:00Added an answer on May 23, 2026 at 1:34 pm

    From: http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html

    Note
    Specifying a parameter as IN, OUT, or INOUT is valid only for a PROCEDURE. 
    For a FUNCTION, parameters are always regarded as IN parameters.
    

    Therefore, I believe you should drop the IN.

    Try:

    CREATE FUNCTION InsertEvent (iPatientMonitoringId BIGINT, iTypeId SMALLINT(6), 
    iChannelId SMALLINT(6), iStart TIMESTAMP, iEnd TIMESTAMP) RETURNS BIGINT 
    DETERMINISTIC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

delimiter | CREATE FUNCTION BASE64_DECODE (input BLOB) RETURNS BLOB CONTAINS SQL DETERMINISTIC SQL SECURITY
I've used the following split function: CREATE FUNCTION dbo.Splitfn(@String varchar(8000), @Delimiter char(1)) returns @temptable
Modifed. DROP FUNCTION IF EXISTS PersonName; DELIMITER |; CREATE FUNCTION PersonName( personID SMALLINT )
The code is: DELIMITER $$ CREATE FUNCTION CHECK_AVABILITY(nama CHAR(30)) RETURNS INT(4) DECLARE vreturn INT(4);
CREATE FUNCTION TWO_FRONT(txt CHAR(30)) RETURNS CHAR(2) RETURN SUBSTRING(txt, 1, 2); DELIMITER $$ CREATE FUNCTION
Please help me finding where I have made mistake? delimiter // CREATE FUNCTION `count_photos_in_gallery`(`tmp_gallery_id`
DELIMITER $$ DROP FUNCTION IF EXISTS `workplantype`.`FUN_STOCKINVENTRY_CHECK` $$ CREATE FUNCTION `workplantype`.`FUN_STOCKINVENTRY_CHECK` ( PONo1 VARCHAR(20),
as title states. here's the function DELIMITER // CREATE FUNCTION GetCreateValue( table_name CHAR(64), id_field
I've this function: DROP FUNCTION IF EXISTS find_linkid; DELIMITER // CREATE FUNCTION `find_linkid`(pc1 VARCHAR(50)
DELIMITER // CREATE FUNCTION F_offshorePrice1(topsbwynum INTEGER, hulsbwynum INTEGER,sbwynum INTEGER, adjprice FLOAT(11,2), price FLOAT(11,2), estprice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.