MySQL Forums
Forum List  »  Newbie

Re: SUBSTR() Function
Posted by: Justin Keller
Date: November 30, 2006 06:57PM

Bob,

Thanks for helping, I am using phpMyAdmin and clicking the table, then S0L, and simply inserting the enture fuction as you posted. I am getting the following error though:

SQL query:

DELIMITER $$ CREATE FUNCTION make_ellipsis(

STRING varchar( 255 )
) RETURNS varchar( 50 ) BEGIN IF length( STRING ) >50 THEN RETURN concat( left( STRING , 47, ) , '...' ) ;

END IF ;

RETURN STRING ;

END$$DELIMITER;



MySQL said:

#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 $$
CREATE FUNCTION make_ellipsis (string varchar(255)) returns varcha' at line 1

Options: ReplyQuote


Subject
Written By
Posted
November 22, 2006 06:02PM
November 23, 2006 12:51AM
November 30, 2006 05:20PM
November 30, 2006 06:23PM
November 30, 2006 06:38PM
November 30, 2006 06:48PM
Re: SUBSTR() Function
November 30, 2006 06:57PM
November 30, 2006 07:03PM
November 30, 2006 07:18PM


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.