Mysql Error 1305 Function Concat Does Not Exist
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us mysql error code 1305 function does not exist Learn more about Stack Overflow the company Business Learn more about hiring developers or
Mysql Error Code 1305 Procedure Does Not Exist
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Error 1305 (42000):
Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL 5.0 reporting “concat does not exist” up
Mysql Function Does Not Exist
vote 2 down vote favorite I have a query with a complex concatenation in it. It's something along the lines of concatenating the results of several sub-selects if the results are not null. It works fine (though the complexity makes me a little sick) on our development server which runs MySQL 5.1 but our production server, which runs 5.0 reports FUNCTION database.concat does not exist Any ideas why mysql error 1305 procedure this might be? Upgrading is unfortunately not an option at this point so unless someone has a bright idea I'm pretty much stuck rewriting this report. Query is as follows (Yes I realize I'm horribly abusing mysql. Let's set that aside for now. If anyone knows how of a way to refer to a subselect by alias that would be handy, but I've never been able to do it, hence the repeated subselect. Also concat returns NULL if any of the arguments are NULL, hence the if statements.) select (concat(if((select concat(if(b.foo is not null, b.foo, ""), " ", if(f.bar is not null, f.bar, "")) from `foo_table` as f left join `bar_table` as b on b.SOME_ID = f.SOME_ID where f.STUDENT_ID = t.STUDENT_ID and bar.NewID = t.OldID order by bar.id limit 1) is not null, (select concat(if(b.foo is not null, b.foo, ""), " ", if(f.bar is not null, f.bar, "")) from `foo_table` as f left join `bar_table` as b on b.SOME_ID = f.SOME_ID where f.STUDENT_ID = t.STUDENT_ID and bar.NewID = t.OldID order by bar.id limit 1), ""), " ", t.reason) as Reason from table as t mysql sql function select concat share|improve this question edited Jun 28 '15 at 8:24 Thomasleveil 14.3k35
MySQL function concat does not exist The SitePoint Forums have moved. You can now find them here. This forum is now closed to new posts, but you http://www.sitepoint.com/forums/showthread.php?562484-function-concat-does-not-exist can browse existing content. You can find out more information about the move and how to open a new account (if necessary) here. If you get stuck you can get support by emailing forums@sitepoint.com If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register does not link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. SitePoint Sponsor User Tag List Results 1 to 4 of 4 Thread: function concat does not exist Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 28, 2008,18:41 #1 wahkau View Profile does not exist View Forum Posts SitePoint Enthusiast Join Date Jul 2008 Posts 29 Mentioned 0 Post(s) Tagged 0 Thread(s) function concat does not exist Code: INSERT INTO `tbl_x` SELECT concat (substring(@count_date, 1, 4), substring(@count_date, 6, 2), substring(@count_date, 9, 2)) as count_date, concat (country_number) as country_number, concat (city_number) as city_number, concat (shop_number) as shop_number, concat (booth_number) as booth_number, concat (substring(food_number, 3, 8)) as food_number, concat (sum(food_amount)) as food_amount, concat (sum(total_account)) as total_account, concat (sum(rebate_account)) as rebate_account, 0 FROM tbl_y WHERE BusinessDate = @count_date and count_date = @count_date GROUP BY country_number, city_number, shop_number, booth_number, food_number; What is wrong with this stored procedure? The error is "function concat does not exist" Jul 28, 2008,19:13 #2 r937 View Profile View Forum Posts SQL Consultant Join Date Jul 2002 Location Toronto, Canada Posts 39,347 Mentioned 63 Post(s) Tagged 3 Thread(s) try removing the space between the function name and the opening parenthesis rudy.ca | @rudydotca Buy my SitePoint book: Simply SQL "giving out my real stuffs" Jul 28, 2008,20:49 #3 wahkau View Profile View Forum Posts SitePoint Enthusiast Join Date Jul 2008 Posts 29 Mentioned 0 Post(s) Tagged 0 Thread(s) Originally Posted by r937 try removing the