Sunday, July 15, 2012

Re: Are Procedures Supported

Stored procedure should work. Are you using the latest command line tool? An older did not properly support the changing the delimiter but that was fixed (discussion). Here is a simple way to test:

  delimiter $$
  select 1$$
  delimiter ;

-- Razvan ME


On Sun, Jul 15, 2012 at 3:01 PM, Tom Peters <tjpeters@petersrock.com> wrote:
I cannot seem to create a procedure.  Is this supported?  I've tried to do it in the API Console and the command line tool google_sql.py.

Below is what I am pasting into the command line tool 

===================================
delimiter $$

DROP PROCEDURE IF EXISTS `addressSelect`$$
CREATE PROCEDURE `addressSelect`(
)
BEGIN
SELECT * from address;
END$$

DELIMITER ;
===================================

Below is what the console spits back at me.

===================================
sql> delimiter $$
  -> 
  -> DROP PROCEDURE IF EXISTS `addressSelect`$$
  -> CREATE PROCEDURE `addressSelect`(
  -> )
  -> BEGIN
  -> SELECT * from address;
ERROR:google_sql: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 'delimiter $ DROP PROCEDURE IF EXISTS `addressSelect`$ CREATE PROCEDURE `addressS' at line 1
sql> END$$
  -> 
  -> DELIMITER ;
ERROR:google_sql: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 'end$ DELIMITER' at line 1
===================================

No comments:

Post a Comment