GPH Theory: Your Ultimate Guide to General Topics, News, SEO, and Technology

Welcome to GPH Theory, your go-to source for the latest news, insights, and analysis on general topics, SEO, technology, and more. Our mission is to provide you with the most relevant and up-to-date information to help you stay ahead of the curve. From beginners to experts, we have something for everyone. Join us and start your journey towards digital excellence today.

Incorrect parameter count in the call to native function 'SUBSTRING_INDEX'

  Bittu      
 Error occurs due to silly mistake at time of writing MYSQL query.

Example :

SELECT SUM(CASE (SUBSTRING_INDEX((SUBSTRING_INDEX(t1.column,'#',t3.column_NO),'#',-1))) WHEN 'l' THEN 1 ELSE 0 END ) AS LEF,SUM(CASE (SUBSTRING_INDEX((SUBSTRING_INDEX(t1.column,'#',t3.column_NO),'#',-1))) WHEN 'r' THEN 1 ELSE 0 END ) AS RIGH, SUM(CASE (SUBSTRING_INDEX((SUBSTRING_INDEX(t1.column,'#',t3.column_NO),'#',-1))) WHEN 'w' THEN 1 ELSE 0 END ) AS WRONG  FROM table1 t1 LEFT JOIN table2 t2 ON t1.ID=t2.ID LEFT JOIN table3 t3 ON RE.column_ID=t3.column_ID WHERE t1.TEST_ID=610 AND t2.column1_ID=341 AND t3.column_NO=1;

Note : Error in above query is some extra brackets.

SUM(CASE (SUBSTRING_INDEX((SUBSTRING_INDEX(t1.column,'#',t3.column_NO),'#',-1))) WHEN 'l' THEN 1 ELSE 0 END ) AS LEF


logoblog

Thanks for reading Incorrect parameter count in the call to native function 'SUBSTRING_INDEX'

Previous
« Prev Post

No comments:

Post a Comment