<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Find any text into Stored Procedure and Function of MySQL	</title>
	<atom:link href="https://www.dbrnd.com/2015/08/find-any-text-into-stored-procedure-and-function-of-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2015/08/find-any-text-into-stored-procedure-and-function-of-mysql/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 25 Aug 2019 05:31:49 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.5</generator>
	<item>
		<title>
		By: Osvaldo		</title>
		<link>https://www.dbrnd.com/2015/08/find-any-text-into-stored-procedure-and-function-of-mysql/#comment-7718</link>

		<dc:creator><![CDATA[Osvaldo]]></dc:creator>
		<pubDate>Sun, 25 Aug 2019 05:31:49 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=378#comment-7718</guid>

					<description><![CDATA[CREATE DEFINER=`root`@`localhost` PROCEDURE `dependencias`()
    NO SQL
BLOCK1:BEGIN
	
	DECLARE bas, c1 VARCHAR(50);
	DECLARE fin int DEFAULT FALSE;
	DECLARE cur1 CURSOR FOR SELECT  specific_name from information_schema.routines where routine_schema= bas;
    DECLARE CONTINUE HANDLER FOR NOT FOUND SET fin = TRUE;

    SET  bas=&#039;bayes&#039;;
    
    DROP TABLE IF EXISTS dependencias;
  	CREATE  TABLE dependencias (a varchar(50), b varchar(50));
	OPEN cur1;
	rulo1: LOOP
	FETCH cur1 INTO c1;
		IF fin THEN
			LEAVE rulo1;
		END IF;
        BLOCK2: BEGIN
        	DECLARE can int; 
         	DECLARE c2,cad varchar(50);
        	DECLARE fin int DEFAULT FALSE;
           	DECLARE cur2 CURSOR FOR SELECT  specific_name from information_schema.routines where routine_schema= bas; 
            DECLARE CONTINUE HANDLER FOR NOT FOUND SET fin = TRUE;
        	OPEN cur2;
    		rulo2: LOOP
        	FETCH cur2 INTO  c2;
				IF fin THEN
  					LEAVE rulo2;
				END IF;
				SET cad=CONCAT (&#039;%&#039;,c2,&#039;(%&#039;);
					SET can=(SELECT COUNT(*) FROM information_schema.routines WHERE Routine_Name = c1 AND routines.routine_definition LIKE cad AND Routine_Schema = bas);
				IF c1!=c2 AND can&#062;0 THEN
					INSERT INTO `dependencias` values (c1,c2);
				END IF;  
			END LOOP rulo2;
			CLOSE cur2; 
		END BLOCK2;	
 	END LOOP rulo1;
 	CLOSE cur1;
END BLOCK1]]></description>
			<content:encoded><![CDATA[<p>CREATE DEFINER=<code>root</code>@<code>localhost</code> PROCEDURE <code>dependencias</code>()<br />
    NO SQL<br />
BLOCK1:BEGIN</p>
<p>	DECLARE bas, c1 VARCHAR(50);<br />
	DECLARE fin int DEFAULT FALSE;<br />
	DECLARE cur1 CURSOR FOR SELECT  specific_name from information_schema.routines where routine_schema= bas;<br />
    DECLARE CONTINUE HANDLER FOR NOT FOUND SET fin = TRUE;</p>
<p>    SET  bas=&#8217;bayes&#8217;;</p>
<p>    DROP TABLE IF EXISTS dependencias;<br />
  	CREATE  TABLE dependencias (a varchar(50), b varchar(50));<br />
	OPEN cur1;<br />
	rulo1: LOOP<br />
	FETCH cur1 INTO c1;<br />
		IF fin THEN<br />
			LEAVE rulo1;<br />
		END IF;<br />
        BLOCK2: BEGIN<br />
        	DECLARE can int;<br />
         	DECLARE c2,cad varchar(50);<br />
        	DECLARE fin int DEFAULT FALSE;<br />
           	DECLARE cur2 CURSOR FOR SELECT  specific_name from information_schema.routines where routine_schema= bas;<br />
            DECLARE CONTINUE HANDLER FOR NOT FOUND SET fin = TRUE;<br />
        	OPEN cur2;<br />
    		rulo2: LOOP<br />
        	FETCH cur2 INTO  c2;<br />
				IF fin THEN<br />
  					LEAVE rulo2;<br />
				END IF;<br />
				SET cad=CONCAT (&#8216;%&#8217;,c2,'(%&#8217;);<br />
					SET can=(SELECT COUNT(*) FROM information_schema.routines WHERE Routine_Name = c1 AND routines.routine_definition LIKE cad AND Routine_Schema = bas);<br />
				IF c1!=c2 AND can&gt;0 THEN<br />
					INSERT INTO <code>dependencias</code> values (c1,c2);<br />
				END IF;<br />
			END LOOP rulo2;<br />
			CLOSE cur2;<br />
		END BLOCK2;<br />
 	END LOOP rulo1;<br />
 	CLOSE cur1;<br />
END BLOCK1</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
