<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Stored Procedures</title>
        <description>Forum for MySQL Stored Procedures</description>
        <link>https://forums.mysql.com/list.php?98</link>
        <lastBuildDate>Sun, 12 Apr 2026 13:04:35 +0000</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forums.mysql.com/read.php?98,740924,740924#msg-740924</guid>
            <title>How to read config data in UDF (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,740924,740924#msg-740924</link>
            <description><![CDATA[ I&#039;m designing a MySQL UDF (or possibly family of UDFs) to accomplish a certain task.  The UDF depends on some &quot;configuration information&quot; (among other things, the hostname for a server). I&#039;d rather not pass that in as an argument to every function call.  I can think of a few ways to do it...<br />
<br />
 1. As a set of environment variables, read them with getenv()<br />
 <br />
 2. As a plain-text configuration file in a well-known place (perhaps &quot;/etc/mysql&quot;, or the mysql data directory), and read and parse it in xxx_init()<br />
<br />
 3. As a table-row in a new table in the `mysql` schema<br />
<br />
Any advice on the benefits and drawbacks of the various options?<br />
<br />
For option 2, is there a server variable I should consider for that &quot;well-known place&quot; instead of hard-coding it?  If so, what&#039;s the proper way to read a server veriable from within a C++ UDF?<br />
<br />
For option 3, what&#039;s the proper way to read one row from one table from within a C++ UDF?]]></description>
            <dc:creator>David L Lambert</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sat, 05 Jul 2025 03:54:10 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,740688,740688#msg-740688</guid>
            <title>Hexadecimal concatenation in recursive CTE is truncated to 64 characters. (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,740688,740688#msg-740688</link>
            <description><![CDATA[ I&#039;m working on Nested Set Hierarchies. I&#039;m using a recursive CTE to build the nested equivalent of adjacency list table. MySQL 8.4 is my platform.<br />
<br />
CREATE TABLE dct_node_adjc <br />
(<br />
    hdct_node_adjc BIGINT UNSIGNED NOT NULL DEFAULT (UUID_SHORT()), <br />
    hdct BIGINT UNSIGNED NOT NULL, <br />
    hdct_node_adjc_parent BIGINT UNSIGNED NULL, <br />
    CONSTRAINT PRIMARY KEY (hdct_node_adjc),<br />
    CONSTRAINT FOREIGN KEY (hdct_node_adjc_parent) <br />
       REFERENCES dct_node_adjc(hdct_node_adjc) ON UPDATE CASCADE<br />
);<br />
<br />
INSERT INTO dct_node_adjc (hdct_node_adjc, hdct, hdct_node_adjc_parent)<br />
VALUES <br />
(101283669313847302, 101283669313847296,                  NULL),<br />
(101324752823517184, 101283669313847297,    101283669313847302),<br />
(101283669313847303, 101283669313847298,    101283669313847302),<br />
(101324752823517185, 101283669313847298,    101324752823517184),<br />
(101283669313847304, 101283669313847299,    101283669313847303),<br />
(101324752823517186, 101283669313847299,    101324752823517185),<br />
(101283669313847305, 101283669313847301,    101283669313847304),<br />
(101324752823517187, 101283669313847301,    101324752823517186),<br />
(101283669313847311, 101283669313847306,                  NULL),<br />
(101283669313847312, 101283669313847307,    101283669313847311),<br />
(101283669313847313, 101283669313847308,    101283669313847312),<br />
(101283669313847314, 101283669313847309,    101283669313847313),<br />
(101283669313847315, 101283669313847310,    101283669313847314),<br />
(101283669313847320, 101283669313847316,                  NULL),<br />
(101283669313847321, 101283669313847317,    101283669313847320),<br />
(101283669313847322, 101283669313847318,    101283669313847321),<br />
(101283669313847323, 101283669313847319,    101283669313847322);<br />
<br />
-- nested set table<br />
DROP TABLE IF EXISTS dct_node_nest;<br />
<br />
CREATE TABLE dct_node_nest <br />
(<br />
    hdct_node_adjc          BIGINT UNSIGNED NOT NULL,<br />
    hdct_node_adjc_parent   BIGINT UNSIGNED     NULL,<br />
    hlevel      INT NOT NULL DEFAULT 0, <br />
    LeftBower   INT NOT NULL DEFAULT 0, <br />
    RightBower  INT NOT NULL DEFAULT 0, <br />
    NodeNumber  INT NOT NULL DEFAULT 0,<br />
    NodeCount   INT NOT NULL DEFAULT 0, <br />
    SortPath    VARBINARY(8000),<br />
    CONSTRAINT UNIQUE KEY (hdct_node_adjc)<br />
);<br />
<br />
Using recursive cte, to build the SortPath VARBINARY column for the final table.<br />
<br />
SET SESSION sql_mode = &#039;&#039;;<br />
<br />
WITH RECURSIVE cte AS (<br />
SELECT a.hdct_node_adjc, a.hdct_node_adjc_parent <br />
   , 1 AS hlevel, 0 AS LeftBower, 0 AS RightBower, 0 AS NodeNumber , 0 AS NodeCount<br />
   , UNHEX(HEX(a.hdct_node_adjc)) AS SortPath<br />
FROM dct_node_adjc AS a WHERE a.hdct_node_adjc_parent IS NULL <br />
UNION ALL <br />
SELECT r.hdct_node_adjc, r.hdct_node_adjc_parent <br />
   , c.hlevel + 1 AS hlevel, c.LeftBower, c.RightBower, c.NodeNumber, c.NodeCount<br />
   , CONCAT(c.SortPath, UNHEX(HEX(r.hdct_node_adjc))) AS SortPath<br />
FROM dct_node_adjc AS r JOIN cte AS c ON c.hdct_node_adjc = r.hdct_node_adjc_parent<br />
)<br />
SELECT c.hdct_node_adjc, c.hlevel, c.SortPath FROM cte AS c;<br />
<br />
SET SESSION sql_mode = &#039;TRADITIONAL&#039;;<br />
<br />
-- output<br />
+--------------------+--------+--------------------------------------------------------------------+<br />
| hdct_node_adjc     | hlevel | SortPath                                                           |<br />
+--------------------+--------+--------------------------------------------------------------------+<br />
| 101283669313847302 |      1 | 0x0167D4F5EB000006                                                 |<br />
| 101283669313847311 |      1 | 0x0167D4F5EB00000F                                                 |<br />
| 101283669313847320 |      1 | 0x0167D4F5EB000018                                                 |<br />
| 101283669313847303 |      2 | 0x0167D4F5EB0000060167D4F5EB000007                                 |<br />
| 101324752823517184 |      2 | 0x0167D4F5EB0000060167FA536B000000                                 |<br />
| 101283669313847312 |      2 | 0x0167D4F5EB00000F0167D4F5EB000010                                 |<br />
| 101283669313847321 |      2 | 0x0167D4F5EB0000180167D4F5EB000019                                 |<br />
| 101283669313847304 |      3 | 0x0167D4F5EB0000060167D4F5EB0000070167D4F5EB000008                 |<br />
| 101324752823517185 |      3 | 0x0167D4F5EB0000060167FA536B0000000167FA536B000001                 |<br />
| 101283669313847313 |      3 | 0x0167D4F5EB00000F0167D4F5EB0000100167D4F5EB000011                 |<br />
| 101283669313847322 |      3 | 0x0167D4F5EB0000180167D4F5EB0000190167D4F5EB00001A                 |<br />
| 101283669313847305 |      4 | 0x0167D4F5EB0000060167D4F5EB0000070167D4F5EB0000080167D4F5EB000009 |<br />
| 101324752823517186 |      4 | 0x0167D4F5EB0000060167FA536B0000000167FA536B0000010167FA536B000002 |<br />
| 101283669313847314 |      4 | 0x0167D4F5EB00000F0167D4F5EB0000100167D4F5EB0000110167D4F5EB000012 |<br />
| 101283669313847323 |      4 | 0x0167D4F5EB0000180167D4F5EB0000190167D4F5EB00001A0167D4F5EB00001B |<br />
| 101324752823517187 |      5 | 0x0167D4F5EB0000060167FA536B0000000167FA536B0000010167FA536B000002 |<br />
| 101283669313847315 |      5 | 0x0167D4F5EB00000F0167D4F5EB0000100167D4F5EB0000110167D4F5EB000012 |<br />
+--------------------+--------+--------------------------------------------------------------------+<br />
17 rows in set (0.02 sec)<br />
<br />
<br />
<br />
Zeros in the select_expr are place holder for later construct. Only the essential columns is selected for testing. The INTO dct_node_nest statement is also not included.<br />
<br />
I&#039;ve tried cast, convert to binary since VARBINARY is rejected by the parser.<br />
<br />
Then use of UNHEX(HEX(hdct_node_adjc )) worked fine to get the 8 byte value, and append the subsequent node id - hdct_node_adjc.<br />
<br />
Problem: only up to 64 characters (4 id&#039;s) is displayed. The 5th id is dropped in rows with hlevel of 5. Why?]]></description>
            <dc:creator>Felipe Lorenzo</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 08 May 2025 16:53:47 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,740181,740181#msg-740181</guid>
            <title>MySQL temporary table hung in system lock (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,740181,740181#msg-740181</link>
            <description><![CDATA[ We have a data warehouse load process in MySQL 8.0.39 which gets hung in system lock while creating and loading temporary table. If we stop it and rerun it finishes in under a minute, otherwise it will be hung for hours till you kill the thread. We checked all the configurations and everything seems to be ok. Anyone any idea what could be causing this, what is it waiting for? There is no other process running on the server, the server is not out of any resource.<br />
<br />
Create Temporary Table temp_svc AS        <br />
SELECT  eps.EpisodeID,<br />
    eps.BusinessUnitID,<br />
    eps.PlanGroupID,<br />
    eph.EffectiveBeginDate,<br />
    eph.EffectiveEndDate    <br />
From stg_EpisodePropertiesHistory eph         <br />
INNER JOIN stg_EpisodeServices eps <br />
    ON  eps.EpisodePropertySetID = eph.EpisodePropertySetID<br />
    AND eps.BusinessUnitID = eph.BusinessUnitID<br />
    And eps.ServiceTypeID = eph.ServiceTypeID<br />
    AND eph.IsInvalid = 0<br />
Where eps.GroupResponsibilityLevel = &#039;Primary&#039;;<br />
Tried checking all the configs, indexes, stopped all other jobs, no change.<br />
<br />
Table: stg_EpisodePropertiesHistory<br />
  PRIMARY KEY (`BI_ID`),<br />
  KEY `IX_stg_EpisodePropertiesHistory_BusinessUnitID` (`BusinessUnitID`),<br />
  KEY `IX_stg_EpisodePropertiesHistory_EpisodeID` (`EpisodeID`),<br />
  KEY `IX_stg_EpisodePropertiesHistory_EPSID_BID` (`EpisodePropertySetID`,`BusinessUnitID`,`ServiceTypeID`,`IsInValid`,`EffectiveBeginDate`,`EffectiveEndDate`)<br />
  <br />
Table: stg_EpisodeServices<br />
  PRIMARY KEY (`BI_ID`),<br />
  KEY `IX_stg_EpisodeServices_BusinessUnitID` (`BusinessUnitID`),<br />
  KEY `IX_stg_EpisodeServices_EpisodeID` (`EpisodeID`),<br />
  KEY `IX_stg_EpisodeServices_EpisodePropertySetID` (`EpisodePropertySetID`),<br />
  KEY `IX_stg_EpisodeServices_ServiceTypeID` (`ServiceTypeID`)]]></description>
            <dc:creator>Biju Philips</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Wed, 29 Jan 2025 19:52:28 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,730839,730839#msg-730839</guid>
            <title>When does Stored Procedure execution plan get determined? (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,730839,730839#msg-730839</link>
            <description><![CDATA[ In SQL Server, Stored Procedure (SP) execution plans are saved at compile time and used whenever the SP is invoked, even if SP parameters in subsequent calls would make a different execution plan more efficient.  Using WITH RECOMPILE forces new plans to be considered with each call.<br />
<br />
Per MySQL docs, there is no equivalent &quot;with recompile&quot;.<br />
<br />
So my question is: &quot;does MySQL reevaluate the execution plans within an SP each time it is called, or are they saved when the SP is first loaded (or first called) and always used regardless of new and changing parameters?&quot;<br />
<br />
I&#039;ve searched the docs, Web and forum and can&#039;t find info on this.]]></description>
            <dc:creator>Robert Rothkopf</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 21 Nov 2024 20:07:32 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,726675,726675#msg-726675</guid>
            <title>JSON_TABLE processing (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,726675,726675#msg-726675</link>
            <description><![CDATA[ SET @json_data = &#039;{&quot;PhCity&quot;:[&quot;Houston&quot;,&quot;Brooklyn&quot;,&quot;New york&quot;,&quot;Memphis&quot;,&quot;Hytxsville&quot;]}&#039;;<br />
<br />
 SET @phcity_list = (<br />
    SELECT GROUP_CONCAT(CONCAT(&quot;&#039;&quot;, value, &quot;&#039;&quot;))<br />
    FROM JSON_TABLE(@json_data, &#039;$.PhCity[*]&#039; COLUMNS (value TEXT PATH &#039;$&#039;)) AS jt<br />
);<br />
select @phcity_list;<br />
<br />
this is my json and want to get @phcity_list output in &#039;Houston&#039;,&#039;Brooklyn&#039;,&#039;Memphis&#039;  so that I can use it in my query like &#039;select * from MyTable where City in(@phcity_list ) limit 100&#039;. But currently select @phcity_list; returns me result like &#039;\&#039;HOUSTON\&#039;,\&#039;FAR ROCKAWAY\&#039;,\&#039;WAUSAU\&#039;,\&#039;KINGSTREE\&#039;,\&#039;ORANGE CITY\&#039;&#039; so, due to &#039;\&#039; no result(s) able to get. Looking a genuine solution for the same. Can&#039;t use table variable because it gives error that table variable can&#039;t be reopen. There are several uses of this json in a single stored procedure]]></description>
            <dc:creator>DK Singh</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 04 Oct 2024 03:54:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,725556,725556#msg-725556</guid>
            <title>&#039;IF&#039; does not work on mysql workbench (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,725556,725556#msg-725556</link>
            <description><![CDATA[ I am new on mysql and trying to become a data analyst. I am trying to use the &#039;IF&#039; function but it keeps giving me an error. I couldn&#039;t find a way to fix it. Please help me, thank you!]]></description>
            <dc:creator>Adam S</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Mon, 19 Aug 2024 13:57:41 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,725447,725447#msg-725447</guid>
            <title>1064 error when create a stored procedure (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,725447,725447#msg-725447</link>
            <description><![CDATA[ I have defined 2 sp. one, named &#039;prc_emp_has_24h&#039;, success created . and another one, &#039;prc_filter_block_emp&#039; created failed. the error is <br />
<br />
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 &#039;out has24h, out xStartTime, out xEndTime);<br />
<br />
sp &#039;prc_emp_has_24h&#039; code likes <br />
```<br />
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_ai2soft_emp_has_24h`(IN empNo VARCHAR(24), OUT has24h int(4), OUT startTime DATETIME(6), OUT endTime DATETIME(6))<br />
BEGIN<br />
  DECLARE ret INT;<br />
  <br />
    ...<br />
                <br />
  IF ret &gt; 0 THEN<br />
    set has24h =  1;<br />
    <br />
    ...<br />
  ELSE<br />
    set has24h = 0;<br />
    SET startTime = null;<br />
    SET endTime = null;<br />
  END if;<br />
  <br />
END<br />
```<br />
<br />
and sp &#039;prc_filter_block_emp&#039; code likes <br />
```<br />
<br />
CREATE PROCEDURE prc_filter_block_emp(destDay DATETIME(6))<br />
BEGIN<br />
  DECLARE has24h int(4);<br />
  DECLARE xStartTime DATETIME(6);<br />
  DECLARE xEndTime DATETIME(6);<br />
  DECLARE done INT DEFAULT FALSE;<br />
  <br />
  DECLARE cursor_emp CURSOR FOR<br />
    SELECT r.pin, r.`name`, r.inorout, r.ttime -- , r.event_point_name<br />
    FROM acc_records r<br />
    INNER JOIN (<br />
      SELECT id, ROW_NUMBER() OVER(PARTITION BY pin ORDER BY ttime DESC) xindex<br />
      FROM acc_records <br />
      WHERE TO_DAYS(ttime) = TO_DAYS(destDay) <br />
      and event_no=0<br />
    ) src<br />
    on r.id =  src.id <br />
    where src.xindex=1 and r.inorout = 0;<br />
  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;<br />
  OPEN cursor_emp;<br />
    read_emp_loop: LOOP<br />
      FETCH cursor_emp INTO empNo, empName, isInOut, ttime;<br />
      <br />
        IF done THEN<br />
          LEAVE read_emp_loop;<br />
        ELSE<br />
          call prc_ai2soft_emp_has_24h(empNo, out has24h, out xStartTime, out xEndTime); <br />
          <br />
          IF has24h THEN -- 如果人员有24门禁权限<br />
            IF xStartTime = null AND xEndTime = NULL THEN<br />
              CONTINUE;<br />
          <br />
            if xStartTime &lt;= ttime and ttime &lt;= xEndTime THEN <br />
              CONTINUE;<br />
          END IF;<br />
        END IF;<br />
    END LOOP read_emp_loop;<br />
  CLOSE cursor_emp;<br />
END<br />
```<br />
<br />
what is the problem?]]></description>
            <dc:creator>goldli zhang</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sun, 11 Aug 2024 03:36:35 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,725042,725042#msg-725042</guid>
            <title>Need procedure help to insert entries to new table from two tables (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,725042,725042#msg-725042</link>
            <description><![CDATA[ HI team,<br />
I am new to procedures i have a requirement and not sure how to start to achieve it.<br />
I have 3 tables <br />
Table_A, Table_B, Table_C<br />
<br />
need to insert entries to Table_A by joining Tble_B and Table_C on bellow conditions<br />
1. all records from table_C  which are not in table_B<br />
2. all records form table_B <br />
3. If same records already present in table_A then dont insert same records from Table_B or Table_C<br />
I need to write a stored procedure in oracle for this requirement. can some one help on this plz<br />
<br />
Thanks<br />
sk]]></description>
            <dc:creator>PK S</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 05 Jul 2024 18:12:50 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,722916,722916#msg-722916</guid>
            <title>MySQL 8.0.28 - Call Stored Procedure stuck after dropping and re-creating (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,722916,722916#msg-722916</link>
            <description><![CDATA[ Hi <br />
I am facing an issue after upgrading MySQL 5.7 to MySQL 8.0.28 whenever I am trying to edit stored procedure on new version MySQL 8.0.28.<br />
<br />
As soon as I drop and re-create stored procedure , the concurrent connections on same stored procedure are stuck and in performance schema in event_Waits_history shows following events <br />
<br />
wait/synch/mutex/innodb/lock_sys_page_mutex<br />
<br />
<br />
I am using dbeaver tool to persist changes in stored procedure.]]></description>
            <dc:creator>Amol Gupta</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Tue, 20 Feb 2024 14:55:20 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,712066,712066#msg-712066</guid>
            <title>MySQL-JavaScript:  Stored programs (functions and procedures) in JavaScript inside MySQL (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,712066,712066#msg-712066</link>
            <description><![CDATA[ MySQL-JavaScript:  Stored programs (functions and procedures) in JavaScript inside MySQL<br />
- <a href="https://blogs.oracle.com/mysql/post/introducing-javascript-support-in-mysql"  rel="nofollow">https://blogs.oracle.com/mysql/post/introducing-javascript-support-in-mysql</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 15 Dec 2023 22:54:16 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,709265,709265#msg-709265</guid>
            <title>Find all procs that inserted/updated data at least once against AWS RDS (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,709265,709265#msg-709265</link>
            <description><![CDATA[ Hi! Perhaps it is not the right forum and I greatly appreciate in advance if you point me in the right direction or relocate my question. <br />
<br />
Background:<br />
We made a problem a while ago with making an AWS MySQL RDS Replica writable so we can run some jobs to update some tables on Replica with calculated results without sending the calculation results to Master(or Source) to be replicated back to Replica. This is how we temporarily reduced the workload from Master. <br />
<br />
Question:<br />
I need to find out all stored procs that are doing inserts/updates to the Replica. The issue is we do not have a dedicated set of procs just for Replicas - we create all procs on the Master and then the procs are replicated to the Replicas. <br />
Is there a system view I can query for all DML operations that are not SELECT on Replicas? <br />
Is there a view to see which procs execute on the Replicas as oppose to being dormant?<br />
<br />
Many thanks in advance,]]></description>
            <dc:creator>M Z</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 15 Jun 2023 20:09:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,708916,708916#msg-708916</guid>
            <title>Create Procedure Generating Errors (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,708916,708916#msg-708916</link>
            <description><![CDATA[ Hi All,<br />
<br />
I have just started with MySQL. Trying to create a SP like so. But unable as MySQL throwing many errors<br />
<br />
CREATE PROCEDURE IF NOT EXISTS db_dentalclinic.sp_AddTreatmentRecord IN (appointmentid int, natureoftreatment varchar, treatmentrendered VARCHAR, toothno tinyint, treatmentcomplete text, treatmentdate date, OUT Saved int)<br />
<br />
DELIMITER //<br />
<br />
 	DECLARE EXIT HANDLER FOR SQLEXCEPTION <br />
        BEGIN<br />
        	select 0 into Saved;<br />
            ROLLBACK;<br />
            RESIGNAL;<br />
        END;<br />
BEGIN  <br />
   <br />
   START TRANSACTION;<br />
		insert into tblTreatments (appointmentid, natureoftreatment, toothnumber,  treatmentcomplete, treatmentdate)<br />
			VALUES<br />
				(appointmentid, &#039;Root Canal Treatment&#039;, toothnumber, 1, CURRENT_DATE());<br />
<br />
		insert into tblTreatmentHistory (treatmentid, treatmentrendered, posttreatmentadvice, treatmentdate, treatmentcomplete, followupdate, 						materialsused)<br />
			VALUES<br />
				(LAST_INSERT_ID(), treatmentrendered, posttreatmentadvice, CURRENT_DATE(), 1, 													CURRENT_DATE(), materialused);<br />
<br />
		select LAST_INSERT_ID into Saved;<br />
	COMMIT;<br />
	<br />
<br />
END//<br />
DELIMITER ;]]></description>
            <dc:creator>Subramanian Mayuranathan</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sun, 30 Apr 2023 07:09:13 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,707446,707446#msg-707446</guid>
            <title>SP runs in Workbench but when called through command line does not behave as expected (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,707446,707446#msg-707446</link>
            <description><![CDATA[ I have a SP that works fine when called in Workbench. However, when I call it through command line only certain portions of the SP are executed. The INSERT lines are ignored. I have never seen this behavior before. Any thoughts? Again, works fine when called in workbench. I do not believe it is a permissions issue. I am not getting any syntax errors either. The referenced account does other inserts inside this db. The inserted columns are just varchar(12) and usually about 1000 rows. Real simple.<br />
<br />
<br />
CREATE DEFINER=`importer`@`%` PROCEDURE `client_stage_step1`()<br />
BEGIN<br />
<br />
/* In some client files such as bogejt, givens, sniderm, a blank label is created due to a starting comment line before the first actual data line. This removes this line. */<br />
DELETE FROM client_stage<br />
WHERE Label = &#039;&#039;;<br />
<br />
<br />
Truncate client_stage_hold;<br />
<br />
/* This is the portion not working */<br />
<br />
INSERT INTO client_stage_hold (portfoliocodefile,label,labelvalue)<br />
	select distinct a.portfoliocodefile, &#039;vehicle&#039; as label, &#039;Wrap&#039; as labelvalue from client_stage a<br />
		where a.portfoliocode IN <br />
			(select portfoliocode from groupings  where groupcode=&#039;totaum.grp&#039;) AND a.portfoliocode IN (select portfoliocode from groupings  where groupcode=&#039;wrapacct.grp&#039;);<br />
<br />
            <br />
INSERT INTO client_stage_hold (portfoliocodefile,label,labelvalue)<br />
	select distinct a.portfoliocodefile, &#039;vehicle&#039; as label, &#039;SMA&#039; as labelvalue from client_stage a<br />
		where a.portfoliocode IN <br />
			(select portfoliocode from groupings  where groupcode=&#039;totaum.grp&#039;) AND NOT a.portfoliocode IN (select portfoliocode from groupings  where groupcode=&#039;wrapacct.grp&#039;);<br />
<br />
/* END: This is the portion not working */ <br />
<br />
INSERT INTO client_stage (portfoliocodefile,label,labelvalue)<br />
	SELECT * from client_stage_hold;<br />
<br />
Insert into client_stage_hold values(&#039;test&#039;,&#039;test&#039;,&#039;test&#039;);<br />
<br />
Truncate client_stage_hold;<br />
<br />
UPDATE client_stage<br />
SET portfoliocode = TRIM(trailing &#039;.cli&#039; FROM portfoliocodefile)<br />
WHERE portfoliocodefile = portfoliocodefile;<br />
END]]></description>
            <dc:creator>John G</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Tue, 07 Feb 2023 19:38:10 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,707417,707417#msg-707417</guid>
            <title>Stored Procedure with date and month input (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,707417,707417#msg-707417</link>
            <description><![CDATA[ Hello everyone, I have a table given below and now i want to <br />
1.create a stored procedure that takes month and year as input and returns the orderNumber,status as output<br />
2. Write a stored procedure to insert a record into the cancellations table for all cancelled orders. <br />
Since I&#039;m new learner so if anyone can help me with this then thank you for your help.<br />
<br />
<br />
<br />
CREATE TABLE `orders` (<br />
  `orderNumber` int(11) NOT NULL,<br />
  `orderDate` date NOT NULL,<br />
  `requiredDate` date NOT NULL,<br />
  `shippedDate` date DEFAULT NULL,<br />
  `status` varchar(15) NOT NULL,<br />
  `comments` text DEFAULT NULL,<br />
  `customerNumber` int(11) NOT NULL,<br />
  PRIMARY KEY (`orderNumber`),<br />
  KEY `customerNumber` (`customerNumber`),<br />
  CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`customerNumber`) REFERENCES `customers` (`customerNumber`)<br />
) ;<br />
<br />
INSERT INTO `orders` VALUES (10100,&#039;2003-01-06&#039;,&#039;2003-01-13&#039;,&#039;2003-01-10&#039;,&#039;Shipped&#039;,NULL,363),(10101,&#039;2003-01-09&#039;,&#039;2003-01-18&#039;,&#039;2003-01-11&#039;,&#039;Shipped&#039;,&#039;Check on availability.&#039;,128),(10102,&#039;2003-01-10&#039;,&#039;2003-01-18&#039;,&#039;2003-01-14&#039;,&#039;Shipped&#039;,NULL,181),(10103,&#039;2003-01-29&#039;,&#039;2003-02-07&#039;,&#039;2003-02-02&#039;,&#039;Shipped&#039;,NULL,121),(10104,&#039;2003-01-31&#039;,&#039;2003-02-09&#039;,&#039;2003-02-01&#039;,&#039;Shipped&#039;,NULL,141),(10105,&#039;2003-02-11&#039;,&#039;2003-02-21&#039;,&#039;2003-02-12&#039;,&#039;Shipped&#039;,NULL,145),(10106,&#039;2003-02-17&#039;,&#039;2003-02-24&#039;,&#039;2003-02-21&#039;,&#039;Shipped&#039;,NULL,278),(10107,&#039;2003-02-24&#039;,&#039;2003-03-03&#039;,&#039;2003-02-26&#039;,&#039;Shipped&#039;,&#039;Difficult to negotiate with customer. We need more marketing materials&#039;,131),(10108,&#039;2003-03-03&#039;,&#039;2003-03-12&#039;,&#039;2003-03-08&#039;,&#039;Shipped&#039;,NULL,385),(10109,&#039;2003-03-10&#039;,&#039;2003-03-19&#039;,&#039;2003-03-11&#039;,&#039;Shipped&#039;,&#039;Customer requested that FedEx Ground is used for this shipping&#039;,486),(10110,&#039;2003-03-18&#039;,&#039;2003-03-24&#039;,&#039;2003-03-20&#039;,&#039;Shipped&#039;,NULL,187),(10111,&#039;2003-03-25&#039;,&#039;2003-03-31&#039;,&#039;2003-03-30&#039;,&#039;Shipped&#039;,NULL,129),(10112,&#039;2003-03-24&#039;,&#039;2003-04-03&#039;,&#039;2003-03-29&#039;,&#039;Shipped&#039;,&#039;Customer requested that ad materials (such as posters, pamphlets) be included in the shippment&#039;,144),(10113,&#039;2003-03-26&#039;,&#039;2003-04-02&#039;,&#039;2003-03-27&#039;,&#039;Shipped&#039;,NULL,124),(10114,&#039;2003-04-01&#039;,&#039;2003-04-07&#039;,&#039;2003-04-02&#039;,&#039;Shipped&#039;,NULL,172),(10115,&#039;2003-04-04&#039;,&#039;2003-04-12&#039;,&#039;2003-04-07&#039;,&#039;Shipped&#039;,NULL,424),(10116,&#039;2003-04-11&#039;,&#039;2003-04-19&#039;,&#039;2003-04-13&#039;,&#039;Shipped&#039;,NULL,381),(10117,&#039;2003-04-16&#039;,&#039;2003-04-24&#039;,&#039;2003-04-17&#039;,&#039;Shipped&#039;,NULL,148),(10118,&#039;2003-04-21&#039;,&#039;2003-04-29&#039;,&#039;2003-04-26&#039;,&#039;Shipped&#039;,&#039;Customer has worked with some of our vendors in the past and is aware of their MSRP&#039;,216),(10119,&#039;2003-04-28&#039;,&#039;2003-05-05&#039;,&#039;2003-05-02&#039;,&#039;Shipped&#039;,NULL,382),(10120,&#039;2003-04-29&#039;,&#039;2003-05-08&#039;,&#039;2003-05-01&#039;,&#039;Shipped&#039;,NULL,114),(10121,&#039;2003-05-07&#039;,&#039;2003-05-13&#039;,&#039;2003-05-13&#039;,&#039;Shipped&#039;,NULL,353),(10122,&#039;2003-05-08&#039;,&#039;2003-05-16&#039;,&#039;2003-05-13&#039;,&#039;Shipped&#039;,NULL,350),(10123,&#039;2003-05-20&#039;,&#039;2003-05-29&#039;,&#039;2003-05-22&#039;,&#039;Shipped&#039;,NULL,103),(10124,&#039;2003-05-21&#039;,&#039;2003-05-29&#039;,&#039;2003-05-25&#039;,&#039;Shipped&#039;,&#039;Customer very concerned about the exact color of the models. There is high risk that he may dispute the order because there is a slight color mismatch&#039;,112),(10125,&#039;2003-05-21&#039;,&#039;2003-05-27&#039;,&#039;2003-05-24&#039;,&#039;Shipped&#039;,NULL,114),(10126,&#039;2003-05-28&#039;,&#039;2003-06-07&#039;,&#039;2003-06-02&#039;,&#039;Shipped&#039;,NULL,458),(10127,&#039;2003-06-03&#039;,&#039;2003-06-09&#039;,&#039;2003-06-06&#039;,&#039;Shipped&#039;,&#039;Customer requested special shippment. The instructions were passed along to the warehouse&#039;,151),(10128,&#039;2003-06-06&#039;,&#039;2003-06-12&#039;,&#039;2003-06-11&#039;,&#039;Shipped&#039;,NULL,141),(10129,&#039;2003-06-12&#039;,&#039;2003-06-18&#039;,&#039;2003-06-14&#039;,&#039;Shipped&#039;,NULL,324),(10130,&#039;2003-06-16&#039;,&#039;2003-06-24&#039;,&#039;2003-06-21&#039;,&#039;Shipped&#039;,NULL,198),(10131,&#039;2003-06-16&#039;,&#039;2003-06-25&#039;,&#039;2003-06-21&#039;,&#039;Shipped&#039;,NULL,447),(10132,&#039;2003-06-25&#039;,&#039;2003-07-01&#039;,&#039;2003-06-28&#039;,&#039;Shipped&#039;,NULL,323),(10133,&#039;2003-06-27&#039;,&#039;2003-07-04&#039;,&#039;2003-07-03&#039;,&#039;Shipped&#039;,NULL,141),(10134,&#039;2003-07-01&#039;,&#039;2003-07-10&#039;,&#039;2003-07-05&#039;,&#039;Shipped&#039;,NULL,250),(10135,&#039;2003-07-02&#039;,&#039;2003-07-12&#039;,&#039;2003-07-03&#039;,&#039;Shipped&#039;,NULL,124),(10136,&#039;2003-07-04&#039;,&#039;2003-07-14&#039;,&#039;2003-07-06&#039;,&#039;Shipped&#039;,&#039;Customer is interested in buying more Ferrari models&#039;,242),(10137,&#039;2003-07-10&#039;,&#039;2003-07-20&#039;,&#039;2003-07-14&#039;,&#039;Shipped&#039;,NULL,353),(10138,&#039;2003-07-07&#039;,&#039;2003-07-16&#039;,&#039;2003-07-13&#039;,&#039;Shipped&#039;,NULL,496),(10139,&#039;2003-07-16&#039;,&#039;2003-07-23&#039;,&#039;2003-07-21&#039;,&#039;Shipped&#039;,NULL,282),(10140,&#039;2003-07-24&#039;,&#039;2003-08-02&#039;,&#039;2003-07-30&#039;,&#039;Shipped&#039;,NULL,161),(10141,&#039;2003-08-01&#039;,&#039;2003-08-09&#039;,&#039;2003-08-04&#039;,&#039;Shipped&#039;,NULL,334),(10142,&#039;2003-08-08&#039;,&#039;2003-08-16&#039;,&#039;2003-08-13&#039;,&#039;Shipped&#039;,NULL,124),(10143,&#039;2003-08-10&#039;,&#039;2003-08-18&#039;,&#039;2003-08-12&#039;,&#039;Shipped&#039;,&#039;Can we deliver the new Ford Mustang models by end-of-quarter?&#039;,320),(10144,&#039;2003-08-13&#039;,&#039;2003-08-21&#039;,&#039;2003-08-14&#039;,&#039;Shipped&#039;,NULL,381),(10145,&#039;2003-08-25&#039;,&#039;2003-09-02&#039;,&#039;2003-08-31&#039;,&#039;Shipped&#039;,NULL,205),(10146,&#039;2003-09-03&#039;,&#039;2003-09-13&#039;,&#039;2003-09-06&#039;,&#039;Shipped&#039;,NULL,447),(10147,&#039;2003-09-05&#039;,&#039;2003-09-12&#039;,&#039;2003-09-09&#039;,&#039;Shipped&#039;,NULL,379),(10148,&#039;2003-09-11&#039;,&#039;2003-09-21&#039;,&#039;2003-09-15&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,276),(10149,&#039;2003-09-12&#039;,&#039;2003-09-18&#039;,&#039;2003-09-17&#039;,&#039;Shipped&#039;,NULL,487),(10150,&#039;2003-09-19&#039;,&#039;2003-09-27&#039;,&#039;2003-09-21&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,148),(10151,&#039;2003-09-21&#039;,&#039;2003-09-30&#039;,&#039;2003-09-24&#039;,&#039;Shipped&#039;,NULL,311),(10152,&#039;2003-09-25&#039;,&#039;2003-10-03&#039;,&#039;2003-10-01&#039;,&#039;Shipped&#039;,NULL,333),(10153,&#039;2003-09-28&#039;,&#039;2003-10-05&#039;,&#039;2003-10-03&#039;,&#039;Shipped&#039;,NULL,141),(10154,&#039;2003-10-02&#039;,&#039;2003-10-12&#039;,&#039;2003-10-08&#039;,&#039;Shipped&#039;,NULL,219),(10155,&#039;2003-10-06&#039;,&#039;2003-10-13&#039;,&#039;2003-10-07&#039;,&#039;Shipped&#039;,NULL,186),(10156,&#039;2003-10-08&#039;,&#039;2003-10-17&#039;,&#039;2003-10-11&#039;,&#039;Shipped&#039;,NULL,141),(10157,&#039;2003-10-09&#039;,&#039;2003-10-15&#039;,&#039;2003-10-14&#039;,&#039;Shipped&#039;,NULL,473),(10158,&#039;2003-10-10&#039;,&#039;2003-10-18&#039;,&#039;2003-10-15&#039;,&#039;Shipped&#039;,NULL,121),(10159,&#039;2003-10-10&#039;,&#039;2003-10-19&#039;,&#039;2003-10-16&#039;,&#039;Shipped&#039;,NULL,321),(10160,&#039;2003-10-11&#039;,&#039;2003-10-17&#039;,&#039;2003-10-17&#039;,&#039;Shipped&#039;,NULL,347),(10161,&#039;2003-10-17&#039;,&#039;2003-10-25&#039;,&#039;2003-10-20&#039;,&#039;Shipped&#039;,NULL,227),(10162,&#039;2003-10-18&#039;,&#039;2003-10-26&#039;,&#039;2003-10-19&#039;,&#039;Shipped&#039;,NULL,321),(10163,&#039;2003-10-20&#039;,&#039;2003-10-27&#039;,&#039;2003-10-24&#039;,&#039;Shipped&#039;,NULL,424),(10164,&#039;2003-10-21&#039;,&#039;2003-10-30&#039;,&#039;2003-10-23&#039;,&#039;Resolved&#039;,&#039;This order was disputed, but resolved on 11/1/2003; Customer doesn\&#039;t like the colors and precision of the models.&#039;,452),(10165,&#039;2003-10-22&#039;,&#039;2003-10-31&#039;,&#039;2003-12-26&#039;,&#039;Shipped&#039;,&#039;This order was on hold because customers\&#039;s credit limit had been exceeded. Order will ship when payment is received&#039;,148),(10166,&#039;2003-10-21&#039;,&#039;2003-10-30&#039;,&#039;2003-10-27&#039;,&#039;Shipped&#039;,NULL,462),(10167,&#039;2003-10-23&#039;,&#039;2003-10-30&#039;,NULL,&#039;Cancelled&#039;,&#039;Customer called to cancel. The warehouse was notified in time and the order didn\&#039;t ship. They have a new VP of Sales and are shifting their sales model. Our VP of Sales should contact them.&#039;,448),(10168,&#039;2003-10-28&#039;,&#039;2003-11-03&#039;,&#039;2003-11-01&#039;,&#039;Shipped&#039;,NULL,161),(10169,&#039;2003-11-04&#039;,&#039;2003-11-14&#039;,&#039;2003-11-09&#039;,&#039;Shipped&#039;,NULL,276),(10170,&#039;2003-11-04&#039;,&#039;2003-11-12&#039;,&#039;2003-11-07&#039;,&#039;Shipped&#039;,NULL,452),(10171,&#039;2003-11-05&#039;,&#039;2003-11-13&#039;,&#039;2003-11-07&#039;,&#039;Shipped&#039;,NULL,233),(10172,&#039;2003-11-05&#039;,&#039;2003-11-14&#039;,&#039;2003-11-11&#039;,&#039;Shipped&#039;,NULL,175),(10173,&#039;2003-11-05&#039;,&#039;2003-11-15&#039;,&#039;2003-11-09&#039;,&#039;Shipped&#039;,&#039;Cautious optimism. We have happy customers here, if we can keep them well stocked.  I need all the information I can get on the planned shippments of Porches&#039;,278),(10174,&#039;2003-11-06&#039;,&#039;2003-11-15&#039;,&#039;2003-11-10&#039;,&#039;Shipped&#039;,NULL,333),(10175,&#039;2003-11-06&#039;,&#039;2003-11-14&#039;,&#039;2003-11-09&#039;,&#039;Shipped&#039;,NULL,324),(10176,&#039;2003-11-06&#039;,&#039;2003-11-15&#039;,&#039;2003-11-12&#039;,&#039;Shipped&#039;,NULL,386),(10177,&#039;2003-11-07&#039;,&#039;2003-11-17&#039;,&#039;2003-11-12&#039;,&#039;Shipped&#039;,NULL,344),(10178,&#039;2003-11-08&#039;,&#039;2003-11-16&#039;,&#039;2003-11-10&#039;,&#039;Shipped&#039;,&#039;Custom shipping instructions sent to warehouse&#039;,242),(10179,&#039;2003-11-11&#039;,&#039;2003-11-17&#039;,&#039;2003-11-13&#039;,&#039;Cancelled&#039;,&#039;Customer cancelled due to urgent budgeting issues. Must be cautious when dealing with them in the future. Since order shipped already we must discuss who would cover the shipping charges.&#039;,496),(10180,&#039;2003-11-11&#039;,&#039;2003-11-19&#039;,&#039;2003-11-14&#039;,&#039;Shipped&#039;,NULL,171),(10181,&#039;2003-11-12&#039;,&#039;2003-11-19&#039;,&#039;2003-11-15&#039;,&#039;Shipped&#039;,NULL,167),(10182,&#039;2003-11-12&#039;,&#039;2003-11-21&#039;,&#039;2003-11-18&#039;,&#039;Shipped&#039;,NULL,124),(10183,&#039;2003-11-13&#039;,&#039;2003-11-22&#039;,&#039;2003-11-15&#039;,&#039;Shipped&#039;,&#039;We need to keep in close contact with their Marketing VP. He is the decision maker for all their purchases.&#039;,339),(10184,&#039;2003-11-14&#039;,&#039;2003-11-22&#039;,&#039;2003-11-20&#039;,&#039;Shipped&#039;,NULL,484),(10185,&#039;2003-11-14&#039;,&#039;2003-11-21&#039;,&#039;2003-11-20&#039;,&#039;Shipped&#039;,NULL,320),(10186,&#039;2003-11-14&#039;,&#039;2003-11-20&#039;,&#039;2003-11-18&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with the VP of Sales&#039;,489),(10187,&#039;2003-11-15&#039;,&#039;2003-11-24&#039;,&#039;2003-11-16&#039;,&#039;Shipped&#039;,NULL,211),(10188,&#039;2003-11-18&#039;,&#039;2003-11-26&#039;,&#039;2003-11-24&#039;,&#039;Shipped&#039;,NULL,167),(10189,&#039;2003-11-18&#039;,&#039;2003-11-25&#039;,&#039;2003-11-24&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,205),(10190,&#039;2003-11-19&#039;,&#039;2003-11-29&#039;,&#039;2003-11-20&#039;,&#039;Shipped&#039;,NULL,141),(10191,&#039;2003-11-20&#039;,&#039;2003-11-30&#039;,&#039;2003-11-24&#039;,&#039;Shipped&#039;,&#039;We must be cautions with this customer. Their VP of Sales resigned. Company may be heading down.&#039;,259),(10192,&#039;2003-11-20&#039;,&#039;2003-11-29&#039;,&#039;2003-11-25&#039;,&#039;Shipped&#039;,NULL,363),(10193,&#039;2003-11-21&#039;,&#039;2003-11-28&#039;,&#039;2003-11-27&#039;,&#039;Shipped&#039;,NULL,471),(10194,&#039;2003-11-25&#039;,&#039;2003-12-02&#039;,&#039;2003-11-26&#039;,&#039;Shipped&#039;,NULL,146),(10195,&#039;2003-11-25&#039;,&#039;2003-12-01&#039;,&#039;2003-11-28&#039;,&#039;Shipped&#039;,NULL,319),(10196,&#039;2003-11-26&#039;,&#039;2003-12-03&#039;,&#039;2003-12-01&#039;,&#039;Shipped&#039;,NULL,455),(10197,&#039;2003-11-26&#039;,&#039;2003-12-02&#039;,&#039;2003-12-01&#039;,&#039;Shipped&#039;,&#039;Customer inquired about remote controlled models and gold models.&#039;,216),(10198,&#039;2003-11-27&#039;,&#039;2003-12-06&#039;,&#039;2003-12-03&#039;,&#039;Shipped&#039;,NULL,385),(10199,&#039;2003-12-01&#039;,&#039;2003-12-10&#039;,&#039;2003-12-06&#039;,&#039;Shipped&#039;,NULL,475),(10200,&#039;2003-12-01&#039;,&#039;2003-12-09&#039;,&#039;2003-12-06&#039;,&#039;Shipped&#039;,NULL,211),(10201,&#039;2003-12-01&#039;,&#039;2003-12-11&#039;,&#039;2003-12-02&#039;,&#039;Shipped&#039;,NULL,129),(10202,&#039;2003-12-02&#039;,&#039;2003-12-09&#039;,&#039;2003-12-06&#039;,&#039;Shipped&#039;,NULL,357),(10203,&#039;2003-12-02&#039;,&#039;2003-12-11&#039;,&#039;2003-12-07&#039;,&#039;Shipped&#039;,NULL,141),(10204,&#039;2003-12-02&#039;,&#039;2003-12-10&#039;,&#039;2003-12-04&#039;,&#039;Shipped&#039;,NULL,151),(10205,&#039;2003-12-03&#039;,&#039;2003-12-09&#039;,&#039;2003-12-07&#039;,&#039;Shipped&#039;,&#039; I need all the information I can get on our competitors.&#039;,141),(10206,&#039;2003-12-05&#039;,&#039;2003-12-13&#039;,&#039;2003-12-08&#039;,&#039;Shipped&#039;,&#039;Can we renegotiate this one?&#039;,202),(10207,&#039;2003-12-09&#039;,&#039;2003-12-17&#039;,&#039;2003-12-11&#039;,&#039;Shipped&#039;,&#039;Check on availability.&#039;,495),(10208,&#039;2004-01-02&#039;,&#039;2004-01-11&#039;,&#039;2004-01-04&#039;,&#039;Shipped&#039;,NULL,146),(10209,&#039;2004-01-09&#039;,&#039;2004-01-15&#039;,&#039;2004-01-12&#039;,&#039;Shipped&#039;,NULL,347),(10210,&#039;2004-01-12&#039;,&#039;2004-01-22&#039;,&#039;2004-01-20&#039;,&#039;Shipped&#039;,NULL,177),(10211,&#039;2004-01-15&#039;,&#039;2004-01-25&#039;,&#039;2004-01-18&#039;,&#039;Shipped&#039;,NULL,406),(10212,&#039;2004-01-16&#039;,&#039;2004-01-24&#039;,&#039;2004-01-18&#039;,&#039;Shipped&#039;,NULL,141),(10213,&#039;2004-01-22&#039;,&#039;2004-01-28&#039;,&#039;2004-01-27&#039;,&#039;Shipped&#039;,&#039;Difficult to negotiate with customer. We need more marketing materials&#039;,489),(10214,&#039;2004-01-26&#039;,&#039;2004-02-04&#039;,&#039;2004-01-29&#039;,&#039;Shipped&#039;,NULL,458),(10215,&#039;2004-01-29&#039;,&#039;2004-02-08&#039;,&#039;2004-02-01&#039;,&#039;Shipped&#039;,&#039;Customer requested that FedEx Ground is used for this shipping&#039;,475),(10216,&#039;2004-02-02&#039;,&#039;2004-02-10&#039;,&#039;2004-02-04&#039;,&#039;Shipped&#039;,NULL,256),(10217,&#039;2004-02-04&#039;,&#039;2004-02-14&#039;,&#039;2004-02-06&#039;,&#039;Shipped&#039;,NULL,166),(10218,&#039;2004-02-09&#039;,&#039;2004-02-16&#039;,&#039;2004-02-11&#039;,&#039;Shipped&#039;,&#039;Customer requested that ad materials (such as posters, pamphlets) be included in the shippment&#039;,473),(10219,&#039;2004-02-10&#039;,&#039;2004-02-17&#039;,&#039;2004-02-12&#039;,&#039;Shipped&#039;,NULL,487),(10220,&#039;2004-02-12&#039;,&#039;2004-02-19&#039;,&#039;2004-02-16&#039;,&#039;Shipped&#039;,NULL,189),(10221,&#039;2004-02-18&#039;,&#039;2004-02-26&#039;,&#039;2004-02-19&#039;,&#039;Shipped&#039;,NULL,314),(10222,&#039;2004-02-19&#039;,&#039;2004-02-27&#039;,&#039;2004-02-20&#039;,&#039;Shipped&#039;,NULL,239),(10223,&#039;2004-02-20&#039;,&#039;2004-02-29&#039;,&#039;2004-02-24&#039;,&#039;Shipped&#039;,NULL,114),(10224,&#039;2004-02-21&#039;,&#039;2004-03-02&#039;,&#039;2004-02-26&#039;,&#039;Shipped&#039;,&#039;Customer has worked with some of our vendors in the past and is aware of their MSRP&#039;,171),(10225,&#039;2004-02-22&#039;,&#039;2004-03-01&#039;,&#039;2004-02-24&#039;,&#039;Shipped&#039;,NULL,298),(10226,&#039;2004-02-26&#039;,&#039;2004-03-06&#039;,&#039;2004-03-02&#039;,&#039;Shipped&#039;,NULL,239),(10227,&#039;2004-03-02&#039;,&#039;2004-03-12&#039;,&#039;2004-03-08&#039;,&#039;Shipped&#039;,NULL,146),(10228,&#039;2004-03-10&#039;,&#039;2004-03-18&#039;,&#039;2004-03-13&#039;,&#039;Shipped&#039;,NULL,173),(10229,&#039;2004-03-11&#039;,&#039;2004-03-20&#039;,&#039;2004-03-12&#039;,&#039;Shipped&#039;,NULL,124),(10230,&#039;2004-03-15&#039;,&#039;2004-03-24&#039;,&#039;2004-03-20&#039;,&#039;Shipped&#039;,&#039;Customer very concerned about the exact color of the models. There is high risk that he may dispute the order because there is a slight color mismatch&#039;,128),(10231,&#039;2004-03-19&#039;,&#039;2004-03-26&#039;,&#039;2004-03-25&#039;,&#039;Shipped&#039;,NULL,344),(10232,&#039;2004-03-20&#039;,&#039;2004-03-30&#039;,&#039;2004-03-25&#039;,&#039;Shipped&#039;,NULL,240),(10233,&#039;2004-03-29&#039;,&#039;2004-04-04&#039;,&#039;2004-04-02&#039;,&#039;Shipped&#039;,&#039;Customer requested special shippment. The instructions were passed along to the warehouse&#039;,328),(10234,&#039;2004-03-30&#039;,&#039;2004-04-05&#039;,&#039;2004-04-02&#039;,&#039;Shipped&#039;,NULL,412),(10235,&#039;2004-04-02&#039;,&#039;2004-04-12&#039;,&#039;2004-04-06&#039;,&#039;Shipped&#039;,NULL,260),(10236,&#039;2004-04-03&#039;,&#039;2004-04-11&#039;,&#039;2004-04-08&#039;,&#039;Shipped&#039;,NULL,486),(10237,&#039;2004-04-05&#039;,&#039;2004-04-12&#039;,&#039;2004-04-10&#039;,&#039;Shipped&#039;,NULL,181),(10238,&#039;2004-04-09&#039;,&#039;2004-04-16&#039;,&#039;2004-04-10&#039;,&#039;Shipped&#039;,NULL,145),(10239,&#039;2004-04-12&#039;,&#039;2004-04-21&#039;,&#039;2004-04-17&#039;,&#039;Shipped&#039;,NULL,311),(10240,&#039;2004-04-13&#039;,&#039;2004-04-20&#039;,&#039;2004-04-20&#039;,&#039;Shipped&#039;,NULL,177),(10241,&#039;2004-04-13&#039;,&#039;2004-04-20&#039;,&#039;2004-04-19&#039;,&#039;Shipped&#039;,NULL,209),(10242,&#039;2004-04-20&#039;,&#039;2004-04-28&#039;,&#039;2004-04-25&#039;,&#039;Shipped&#039;,&#039;Customer is interested in buying more Ferrari models&#039;,456),(10243,&#039;2004-04-26&#039;,&#039;2004-05-03&#039;,&#039;2004-04-28&#039;,&#039;Shipped&#039;,NULL,495),(10244,&#039;2004-04-29&#039;,&#039;2004-05-09&#039;,&#039;2004-05-04&#039;,&#039;Shipped&#039;,NULL,141),(10245,&#039;2004-05-04&#039;,&#039;2004-05-12&#039;,&#039;2004-05-09&#039;,&#039;Shipped&#039;,NULL,455),(10246,&#039;2004-05-05&#039;,&#039;2004-05-13&#039;,&#039;2004-05-06&#039;,&#039;Shipped&#039;,NULL,141),(10247,&#039;2004-05-05&#039;,&#039;2004-05-11&#039;,&#039;2004-05-08&#039;,&#039;Shipped&#039;,NULL,334),(10248,&#039;2004-05-07&#039;,&#039;2004-05-14&#039;,NULL,&#039;Cancelled&#039;,&#039;Order was mistakenly placed. The warehouse noticed the lack of documentation.&#039;,131),(10249,&#039;2004-05-08&#039;,&#039;2004-05-17&#039;,&#039;2004-05-11&#039;,&#039;Shipped&#039;,&#039;Can we deliver the new Ford Mustang models by end-of-quarter?&#039;,173),(10250,&#039;2004-05-11&#039;,&#039;2004-05-19&#039;,&#039;2004-05-15&#039;,&#039;Shipped&#039;,NULL,450),(10251,&#039;2004-05-18&#039;,&#039;2004-05-24&#039;,&#039;2004-05-24&#039;,&#039;Shipped&#039;,NULL,328),(10252,&#039;2004-05-26&#039;,&#039;2004-06-04&#039;,&#039;2004-05-29&#039;,&#039;Shipped&#039;,NULL,406),(10253,&#039;2004-06-01&#039;,&#039;2004-06-09&#039;,&#039;2004-06-02&#039;,&#039;Cancelled&#039;,&#039;Customer disputed the order and we agreed to cancel it. We must be more cautions with this customer going forward, since they are very hard to please. We must cover the shipping fees.&#039;,201),(10254,&#039;2004-06-03&#039;,&#039;2004-06-13&#039;,&#039;2004-06-04&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,323),(10255,&#039;2004-06-04&#039;,&#039;2004-06-12&#039;,&#039;2004-06-09&#039;,&#039;Shipped&#039;,NULL,209),(10256,&#039;2004-06-08&#039;,&#039;2004-06-16&#039;,&#039;2004-06-10&#039;,&#039;Shipped&#039;,NULL,145),(10257,&#039;2004-06-14&#039;,&#039;2004-06-24&#039;,&#039;2004-06-15&#039;,&#039;Shipped&#039;,NULL,450),(10258,&#039;2004-06-15&#039;,&#039;2004-06-25&#039;,&#039;2004-06-23&#039;,&#039;Shipped&#039;,NULL,398),(10259,&#039;2004-06-15&#039;,&#039;2004-06-22&#039;,&#039;2004-06-17&#039;,&#039;Shipped&#039;,NULL,166),(10260,&#039;2004-06-16&#039;,&#039;2004-06-22&#039;,NULL,&#039;Cancelled&#039;,&#039;Customer heard complaints from their customers and called to cancel this order. Will notify the Sales Manager.&#039;,357),(10261,&#039;2004-06-17&#039;,&#039;2004-06-25&#039;,&#039;2004-06-22&#039;,&#039;Shipped&#039;,NULL,233),(10262,&#039;2004-06-24&#039;,&#039;2004-07-01&#039;,NULL,&#039;Cancelled&#039;,&#039;This customer found a better offer from one of our competitors. Will call back to renegotiate.&#039;,141),(10263,&#039;2004-06-28&#039;,&#039;2004-07-04&#039;,&#039;2004-07-02&#039;,&#039;Shipped&#039;,NULL,175),(10264,&#039;2004-06-30&#039;,&#039;2004-07-06&#039;,&#039;2004-07-01&#039;,&#039;Shipped&#039;,&#039;Customer will send a truck to our local warehouse on 7/1/2004&#039;,362),(10265,&#039;2004-07-02&#039;,&#039;2004-07-09&#039;,&#039;2004-07-07&#039;,&#039;Shipped&#039;,NULL,471),(10266,&#039;2004-07-06&#039;,&#039;2004-07-14&#039;,&#039;2004-07-10&#039;,&#039;Shipped&#039;,NULL,386),(10267,&#039;2004-07-07&#039;,&#039;2004-07-17&#039;,&#039;2004-07-09&#039;,&#039;Shipped&#039;,NULL,151),(10268,&#039;2004-07-12&#039;,&#039;2004-07-18&#039;,&#039;2004-07-14&#039;,&#039;Shipped&#039;,NULL,412),(10269,&#039;2004-07-16&#039;,&#039;2004-07-22&#039;,&#039;2004-07-18&#039;,&#039;Shipped&#039;,NULL,382),(10270,&#039;2004-07-19&#039;,&#039;2004-07-27&#039;,&#039;2004-07-24&#039;,&#039;Shipped&#039;,&#039;Can we renegotiate this one?&#039;,282),(10271,&#039;2004-07-20&#039;,&#039;2004-07-29&#039;,&#039;2004-07-23&#039;,&#039;Shipped&#039;,NULL,124),(10272,&#039;2004-07-20&#039;,&#039;2004-07-26&#039;,&#039;2004-07-22&#039;,&#039;Shipped&#039;,NULL,157),(10273,&#039;2004-07-21&#039;,&#039;2004-07-28&#039;,&#039;2004-07-22&#039;,&#039;Shipped&#039;,NULL,314),(10274,&#039;2004-07-21&#039;,&#039;2004-07-29&#039;,&#039;2004-07-22&#039;,&#039;Shipped&#039;,NULL,379),(10275,&#039;2004-07-23&#039;,&#039;2004-08-02&#039;,&#039;2004-07-29&#039;,&#039;Shipped&#039;,NULL,119),(10276,&#039;2004-08-02&#039;,&#039;2004-08-11&#039;,&#039;2004-08-08&#039;,&#039;Shipped&#039;,NULL,204),(10277,&#039;2004-08-04&#039;,&#039;2004-08-12&#039;,&#039;2004-08-05&#039;,&#039;Shipped&#039;,NULL,148),(10278,&#039;2004-08-06&#039;,&#039;2004-08-16&#039;,&#039;2004-08-09&#039;,&#039;Shipped&#039;,NULL,112),(10279,&#039;2004-08-09&#039;,&#039;2004-08-19&#039;,&#039;2004-08-15&#039;,&#039;Shipped&#039;,&#039;Cautious optimism. We have happy customers here, if we can keep them well stocked.  I need all the information I can get on the planned shippments of Porches&#039;,141),(10280,&#039;2004-08-17&#039;,&#039;2004-08-27&#039;,&#039;2004-08-19&#039;,&#039;Shipped&#039;,NULL,249),(10281,&#039;2004-08-19&#039;,&#039;2004-08-28&#039;,&#039;2004-08-23&#039;,&#039;Shipped&#039;,NULL,157),(10282,&#039;2004-08-20&#039;,&#039;2004-08-26&#039;,&#039;2004-08-22&#039;,&#039;Shipped&#039;,NULL,124),(10283,&#039;2004-08-20&#039;,&#039;2004-08-30&#039;,&#039;2004-08-23&#039;,&#039;Shipped&#039;,NULL,260),(10284,&#039;2004-08-21&#039;,&#039;2004-08-29&#039;,&#039;2004-08-26&#039;,&#039;Shipped&#039;,&#039;Custom shipping instructions sent to warehouse&#039;,299),(10285,&#039;2004-08-27&#039;,&#039;2004-09-04&#039;,&#039;2004-08-31&#039;,&#039;Shipped&#039;,NULL,286),(10286,&#039;2004-08-28&#039;,&#039;2004-09-06&#039;,&#039;2004-09-01&#039;,&#039;Shipped&#039;,NULL,172),(10287,&#039;2004-08-30&#039;,&#039;2004-09-06&#039;,&#039;2004-09-01&#039;,&#039;Shipped&#039;,NULL,298),(10288,&#039;2004-09-01&#039;,&#039;2004-09-11&#039;,&#039;2004-09-05&#039;,&#039;Shipped&#039;,NULL,166),(10289,&#039;2004-09-03&#039;,&#039;2004-09-13&#039;,&#039;2004-09-04&#039;,&#039;Shipped&#039;,&#039;We need to keep in close contact with their Marketing VP. He is the decision maker for all their purchases.&#039;,167),(10290,&#039;2004-09-07&#039;,&#039;2004-09-15&#039;,&#039;2004-09-13&#039;,&#039;Shipped&#039;,NULL,198),(10291,&#039;2004-09-08&#039;,&#039;2004-09-17&#039;,&#039;2004-09-14&#039;,&#039;Shipped&#039;,NULL,448),(10292,&#039;2004-09-08&#039;,&#039;2004-09-18&#039;,&#039;2004-09-11&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,131),(10293,&#039;2004-09-09&#039;,&#039;2004-09-18&#039;,&#039;2004-09-14&#039;,&#039;Shipped&#039;,NULL,249),(10294,&#039;2004-09-10&#039;,&#039;2004-09-17&#039;,&#039;2004-09-14&#039;,&#039;Shipped&#039;,NULL,204),(10295,&#039;2004-09-10&#039;,&#039;2004-09-17&#039;,&#039;2004-09-14&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,362),(10296,&#039;2004-09-15&#039;,&#039;2004-09-22&#039;,&#039;2004-09-16&#039;,&#039;Shipped&#039;,NULL,415),(10297,&#039;2004-09-16&#039;,&#039;2004-09-22&#039;,&#039;2004-09-21&#039;,&#039;Shipped&#039;,&#039;We must be cautions with this customer. Their VP of Sales resigned. Company may be heading down.&#039;,189),(10298,&#039;2004-09-27&#039;,&#039;2004-10-05&#039;,&#039;2004-10-01&#039;,&#039;Shipped&#039;,NULL,103),(10299,&#039;2004-09-30&#039;,&#039;2004-10-10&#039;,&#039;2004-10-01&#039;,&#039;Shipped&#039;,NULL,186),(10300,&#039;2003-10-04&#039;,&#039;2003-10-13&#039;,&#039;2003-10-09&#039;,&#039;Shipped&#039;,NULL,128),(10301,&#039;2003-10-05&#039;,&#039;2003-10-15&#039;,&#039;2003-10-08&#039;,&#039;Shipped&#039;,NULL,299),(10302,&#039;2003-10-06&#039;,&#039;2003-10-16&#039;,&#039;2003-10-07&#039;,&#039;Shipped&#039;,NULL,201),(10303,&#039;2004-10-06&#039;,&#039;2004-10-14&#039;,&#039;2004-10-09&#039;,&#039;Shipped&#039;,&#039;Customer inquired about remote controlled models and gold models.&#039;,484),(10304,&#039;2004-10-11&#039;,&#039;2004-10-20&#039;,&#039;2004-10-17&#039;,&#039;Shipped&#039;,NULL,256),(10305,&#039;2004-10-13&#039;,&#039;2004-10-22&#039;,&#039;2004-10-15&#039;,&#039;Shipped&#039;,&#039;Check on availability.&#039;,286),(10306,&#039;2004-10-14&#039;,&#039;2004-10-21&#039;,&#039;2004-10-17&#039;,&#039;Shipped&#039;,NULL,187),(10307,&#039;2004-10-14&#039;,&#039;2004-10-23&#039;,&#039;2004-10-20&#039;,&#039;Shipped&#039;,NULL,339),(10308,&#039;2004-10-15&#039;,&#039;2004-10-24&#039;,&#039;2004-10-20&#039;,&#039;Shipped&#039;,&#039;Customer requested that FedEx Ground is used for this shipping&#039;,319),(10309,&#039;2004-10-15&#039;,&#039;2004-10-24&#039;,&#039;2004-10-18&#039;,&#039;Shipped&#039;,NULL,121),(10310,&#039;2004-10-16&#039;,&#039;2004-10-24&#039;,&#039;2004-10-18&#039;,&#039;Shipped&#039;,NULL,259),(10311,&#039;2004-10-16&#039;,&#039;2004-10-23&#039;,&#039;2004-10-20&#039;,&#039;Shipped&#039;,&#039;Difficult to negotiate with customer. We need more marketing materials&#039;,141),(10312,&#039;2004-10-21&#039;,&#039;2004-10-27&#039;,&#039;2004-10-23&#039;,&#039;Shipped&#039;,NULL,124),(10313,&#039;2004-10-22&#039;,&#039;2004-10-28&#039;,&#039;2004-10-25&#039;,&#039;Shipped&#039;,&#039;Customer requested that FedEx Ground is used for this shipping&#039;,202),(10314,&#039;2004-10-22&#039;,&#039;2004-11-01&#039;,&#039;2004-10-23&#039;,&#039;Shipped&#039;,NULL,227),(10315,&#039;2004-10-29&#039;,&#039;2004-11-08&#039;,&#039;2004-10-30&#039;,&#039;Shipped&#039;,NULL,119),(10316,&#039;2004-11-01&#039;,&#039;2004-11-09&#039;,&#039;2004-11-07&#039;,&#039;Shipped&#039;,&#039;Customer requested that ad materials (such as posters, pamphlets) be included in the shippment&#039;,240),(10317,&#039;2004-11-02&#039;,&#039;2004-11-12&#039;,&#039;2004-11-08&#039;,&#039;Shipped&#039;,NULL,161),(10318,&#039;2004-11-02&#039;,&#039;2004-11-09&#039;,&#039;2004-11-07&#039;,&#039;Shipped&#039;,NULL,157),(10319,&#039;2004-11-03&#039;,&#039;2004-11-11&#039;,&#039;2004-11-06&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,456),(10320,&#039;2004-11-03&#039;,&#039;2004-11-13&#039;,&#039;2004-11-07&#039;,&#039;Shipped&#039;,NULL,144),(10321,&#039;2004-11-04&#039;,&#039;2004-11-12&#039;,&#039;2004-11-07&#039;,&#039;Shipped&#039;,NULL,462),(10322,&#039;2004-11-04&#039;,&#039;2004-11-12&#039;,&#039;2004-11-10&#039;,&#039;Shipped&#039;,&#039;Customer has worked with some of our vendors in the past and is aware of their MSRP&#039;,363),(10323,&#039;2004-11-05&#039;,&#039;2004-11-12&#039;,&#039;2004-11-09&#039;,&#039;Shipped&#039;,NULL,128),(10324,&#039;2004-11-05&#039;,&#039;2004-11-11&#039;,&#039;2004-11-08&#039;,&#039;Shipped&#039;,NULL,181),(10325,&#039;2004-11-05&#039;,&#039;2004-11-13&#039;,&#039;2004-11-08&#039;,&#039;Shipped&#039;,NULL,121),(10326,&#039;2004-11-09&#039;,&#039;2004-11-16&#039;,&#039;2004-11-10&#039;,&#039;Shipped&#039;,NULL,144),(10327,&#039;2004-11-10&#039;,&#039;2004-11-19&#039;,&#039;2004-11-13&#039;,&#039;Resolved&#039;,&#039;Order was disputed and resolved on 12/1/04. The Sales Manager was involved. Customer claims the scales of the models don\&#039;t match what was discussed.&#039;,145),(10328,&#039;2004-11-12&#039;,&#039;2004-11-21&#039;,&#039;2004-11-18&#039;,&#039;Shipped&#039;,&#039;Customer very concerned about the exact color of the models. There is high risk that he may dispute the order because there is a slight color mismatch&#039;,278),(10329,&#039;2004-11-15&#039;,&#039;2004-11-24&#039;,&#039;2004-11-16&#039;,&#039;Shipped&#039;,NULL,131),(10330,&#039;2004-11-16&#039;,&#039;2004-11-25&#039;,&#039;2004-11-21&#039;,&#039;Shipped&#039;,NULL,385),(10331,&#039;2004-11-17&#039;,&#039;2004-11-23&#039;,&#039;2004-11-23&#039;,&#039;Shipped&#039;,&#039;Customer requested special shippment. The instructions were passed along to the warehouse&#039;,486),(10332,&#039;2004-11-17&#039;,&#039;2004-11-25&#039;,&#039;2004-11-18&#039;,&#039;Shipped&#039;,NULL,187),(10333,&#039;2004-11-18&#039;,&#039;2004-11-27&#039;,&#039;2004-11-20&#039;,&#039;Shipped&#039;,NULL,129),(10334,&#039;2004-11-19&#039;,&#039;2004-11-28&#039;,NULL,&#039;On Hold&#039;,&#039;The outstaniding balance for this customer exceeds their credit limit. Order will be shipped when a payment is received.&#039;,144),(10335,&#039;2004-11-19&#039;,&#039;2004-11-29&#039;,&#039;2004-11-23&#039;,&#039;Shipped&#039;,NULL,124),(10336,&#039;2004-11-20&#039;,&#039;2004-11-26&#039;,&#039;2004-11-24&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,172),(10337,&#039;2004-11-21&#039;,&#039;2004-11-30&#039;,&#039;2004-11-26&#039;,&#039;Shipped&#039;,NULL,424),(10338,&#039;2004-11-22&#039;,&#039;2004-12-02&#039;,&#039;2004-11-27&#039;,&#039;Shipped&#039;,NULL,381),(10339,&#039;2004-11-23&#039;,&#039;2004-11-30&#039;,&#039;2004-11-30&#039;,&#039;Shipped&#039;,NULL,398),(10340,&#039;2004-11-24&#039;,&#039;2004-12-01&#039;,&#039;2004-11-25&#039;,&#039;Shipped&#039;,&#039;Customer is interested in buying more Ferrari models&#039;,216),(10341,&#039;2004-11-24&#039;,&#039;2004-12-01&#039;,&#039;2004-11-29&#039;,&#039;Shipped&#039;,NULL,382),(10342,&#039;2004-11-24&#039;,&#039;2004-12-01&#039;,&#039;2004-11-29&#039;,&#039;Shipped&#039;,NULL,114),(10343,&#039;2004-11-24&#039;,&#039;2004-12-01&#039;,&#039;2004-11-26&#039;,&#039;Shipped&#039;,NULL,353),(10344,&#039;2004-11-25&#039;,&#039;2004-12-02&#039;,&#039;2004-11-29&#039;,&#039;Shipped&#039;,NULL,350),(10345,&#039;2004-11-25&#039;,&#039;2004-12-01&#039;,&#039;2004-11-26&#039;,&#039;Shipped&#039;,NULL,103),(10346,&#039;2004-11-29&#039;,&#039;2004-12-05&#039;,&#039;2004-11-30&#039;,&#039;Shipped&#039;,NULL,112),(10347,&#039;2004-11-29&#039;,&#039;2004-12-07&#039;,&#039;2004-11-30&#039;,&#039;Shipped&#039;,&#039;Can we deliver the new Ford Mustang models by end-of-quarter?&#039;,114),(10348,&#039;2004-11-01&#039;,&#039;2004-11-08&#039;,&#039;2004-11-05&#039;,&#039;Shipped&#039;,NULL,458),(10349,&#039;2004-12-01&#039;,&#039;2004-12-07&#039;,&#039;2004-12-03&#039;,&#039;Shipped&#039;,NULL,151),(10350,&#039;2004-12-02&#039;,&#039;2004-12-08&#039;,&#039;2004-12-05&#039;,&#039;Shipped&#039;,NULL,141),(10351,&#039;2004-12-03&#039;,&#039;2004-12-11&#039;,&#039;2004-12-07&#039;,&#039;Shipped&#039;,NULL,324),(10352,&#039;2004-12-03&#039;,&#039;2004-12-12&#039;,&#039;2004-12-09&#039;,&#039;Shipped&#039;,NULL,198),(10353,&#039;2004-12-04&#039;,&#039;2004-12-11&#039;,&#039;2004-12-05&#039;,&#039;Shipped&#039;,NULL,447),(10354,&#039;2004-12-04&#039;,&#039;2004-12-10&#039;,&#039;2004-12-05&#039;,&#039;Shipped&#039;,NULL,323),(10355,&#039;2004-12-07&#039;,&#039;2004-12-14&#039;,&#039;2004-12-13&#039;,&#039;Shipped&#039;,NULL,141),(10356,&#039;2004-12-09&#039;,&#039;2004-12-15&#039;,&#039;2004-12-12&#039;,&#039;Shipped&#039;,NULL,250),(10357,&#039;2004-12-10&#039;,&#039;2004-12-16&#039;,&#039;2004-12-14&#039;,&#039;Shipped&#039;,NULL,124),(10358,&#039;2004-12-10&#039;,&#039;2004-12-16&#039;,&#039;2004-12-16&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,141),(10359,&#039;2004-12-15&#039;,&#039;2004-12-23&#039;,&#039;2004-12-18&#039;,&#039;Shipped&#039;,NULL,353),(10360,&#039;2004-12-16&#039;,&#039;2004-12-22&#039;,&#039;2004-12-18&#039;,&#039;Shipped&#039;,NULL,496),(10361,&#039;2004-12-17&#039;,&#039;2004-12-24&#039;,&#039;2004-12-20&#039;,&#039;Shipped&#039;,NULL,282),(10362,&#039;2005-01-05&#039;,&#039;2005-01-16&#039;,&#039;2005-01-10&#039;,&#039;Shipped&#039;,NULL,161),(10363,&#039;2005-01-06&#039;,&#039;2005-01-12&#039;,&#039;2005-01-10&#039;,&#039;Shipped&#039;,NULL,334),(10364,&#039;2005-01-06&#039;,&#039;2005-01-17&#039;,&#039;2005-01-09&#039;,&#039;Shipped&#039;,NULL,350),(10365,&#039;2005-01-07&#039;,&#039;2005-01-18&#039;,&#039;2005-01-11&#039;,&#039;Shipped&#039;,NULL,320),(10366,&#039;2005-01-10&#039;,&#039;2005-01-19&#039;,&#039;2005-01-12&#039;,&#039;Shipped&#039;,NULL,381),(10367,&#039;2005-01-12&#039;,&#039;2005-01-21&#039;,&#039;2005-01-16&#039;,&#039;Resolved&#039;,&#039;This order was disputed and resolved on 2/1/2005. Customer claimed that container with shipment was damaged. FedEx\&#039;s investigation proved this wrong.&#039;,205),(10368,&#039;2005-01-19&#039;,&#039;2005-01-27&#039;,&#039;2005-01-24&#039;,&#039;Shipped&#039;,&#039;Can we renegotiate this one?&#039;,124),(10369,&#039;2005-01-20&#039;,&#039;2005-01-28&#039;,&#039;2005-01-24&#039;,&#039;Shipped&#039;,NULL,379),(10370,&#039;2005-01-20&#039;,&#039;2005-02-01&#039;,&#039;2005-01-25&#039;,&#039;Shipped&#039;,NULL,276),(10371,&#039;2005-01-23&#039;,&#039;2005-02-03&#039;,&#039;2005-01-25&#039;,&#039;Shipped&#039;,NULL,124),(10372,&#039;2005-01-26&#039;,&#039;2005-02-05&#039;,&#039;2005-01-28&#039;,&#039;Shipped&#039;,NULL,398),(10373,&#039;2005-01-31&#039;,&#039;2005-02-08&#039;,&#039;2005-02-06&#039;,&#039;Shipped&#039;,NULL,311),(10374,&#039;2005-02-02&#039;,&#039;2005-02-09&#039;,&#039;2005-02-03&#039;,&#039;Shipped&#039;,NULL,333),(10375,&#039;2005-02-03&#039;,&#039;2005-02-10&#039;,&#039;2005-02-06&#039;,&#039;Shipped&#039;,NULL,119),(10376,&#039;2005-02-08&#039;,&#039;2005-02-18&#039;,&#039;2005-02-13&#039;,&#039;Shipped&#039;,NULL,219),(10377,&#039;2005-02-09&#039;,&#039;2005-02-21&#039;,&#039;2005-02-12&#039;,&#039;Shipped&#039;,&#039;Cautious optimism. We have happy customers here, if we can keep them well stocked.  I need all the information I can get on the planned shippments of Porches&#039;,186),(10378,&#039;2005-02-10&#039;,&#039;2005-02-18&#039;,&#039;2005-02-11&#039;,&#039;Shipped&#039;,NULL,141),(10379,&#039;2005-02-10&#039;,&#039;2005-02-18&#039;,&#039;2005-02-11&#039;,&#039;Shipped&#039;,NULL,141),(10380,&#039;2005-02-16&#039;,&#039;2005-02-24&#039;,&#039;2005-02-18&#039;,&#039;Shipped&#039;,NULL,141),(10381,&#039;2005-02-17&#039;,&#039;2005-02-25&#039;,&#039;2005-02-18&#039;,&#039;Shipped&#039;,NULL,321),(10382,&#039;2005-02-17&#039;,&#039;2005-02-23&#039;,&#039;2005-02-18&#039;,&#039;Shipped&#039;,&#039;Custom shipping instructions sent to warehouse&#039;,124),(10383,&#039;2005-02-22&#039;,&#039;2005-03-02&#039;,&#039;2005-02-25&#039;,&#039;Shipped&#039;,NULL,141),(10384,&#039;2005-02-23&#039;,&#039;2005-03-06&#039;,&#039;2005-02-27&#039;,&#039;Shipped&#039;,NULL,321),(10385,&#039;2005-02-28&#039;,&#039;2005-03-09&#039;,&#039;2005-03-01&#039;,&#039;Shipped&#039;,NULL,124),(10386,&#039;2005-03-01&#039;,&#039;2005-03-09&#039;,&#039;2005-03-06&#039;,&#039;Resolved&#039;,&#039;Disputed then Resolved on 3/15/2005. Customer doesn\&#039;t like the craftsmaship of the models.&#039;,141),(10387,&#039;2005-03-02&#039;,&#039;2005-03-09&#039;,&#039;2005-03-06&#039;,&#039;Shipped&#039;,&#039;We need to keep in close contact with their Marketing VP. He is the decision maker for all their purchases.&#039;,148),(10388,&#039;2005-03-03&#039;,&#039;2005-03-11&#039;,&#039;2005-03-09&#039;,&#039;Shipped&#039;,NULL,462),(10389,&#039;2005-03-03&#039;,&#039;2005-03-09&#039;,&#039;2005-03-08&#039;,&#039;Shipped&#039;,NULL,448),(10390,&#039;2005-03-04&#039;,&#039;2005-03-11&#039;,&#039;2005-03-07&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,124),(10391,&#039;2005-03-09&#039;,&#039;2005-03-20&#039;,&#039;2005-03-15&#039;,&#039;Shipped&#039;,NULL,276),(10392,&#039;2005-03-10&#039;,&#039;2005-03-18&#039;,&#039;2005-03-12&#039;,&#039;Shipped&#039;,NULL,452),(10393,&#039;2005-03-11&#039;,&#039;2005-03-22&#039;,&#039;2005-03-14&#039;,&#039;Shipped&#039;,&#039;They want to reevaluate their terms agreement with Finance.&#039;,323),(10394,&#039;2005-03-15&#039;,&#039;2005-03-25&#039;,&#039;2005-03-19&#039;,&#039;Shipped&#039;,NULL,141),(10395,&#039;2005-03-17&#039;,&#039;2005-03-24&#039;,&#039;2005-03-23&#039;,&#039;Shipped&#039;,&#039;We must be cautions with this customer. Their VP of Sales resigned. Company may be heading down.&#039;,250),(10396,&#039;2005-03-23&#039;,&#039;2005-04-02&#039;,&#039;2005-03-28&#039;,&#039;Shipped&#039;,NULL,124),(10397,&#039;2005-03-28&#039;,&#039;2005-04-09&#039;,&#039;2005-04-01&#039;,&#039;Shipped&#039;,NULL,242),(10398,&#039;2005-03-30&#039;,&#039;2005-04-09&#039;,&#039;2005-03-31&#039;,&#039;Shipped&#039;,NULL,353),(10399,&#039;2005-04-01&#039;,&#039;2005-04-12&#039;,&#039;2005-04-03&#039;,&#039;Shipped&#039;,NULL,496),(10400,&#039;2005-04-01&#039;,&#039;2005-04-11&#039;,&#039;2005-04-04&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,450),(10401,&#039;2005-04-03&#039;,&#039;2005-04-14&#039;,NULL,&#039;On Hold&#039;,&#039;Customer credit limit exceeded. Will ship when a payment is received.&#039;,328),(10402,&#039;2005-04-07&#039;,&#039;2005-04-14&#039;,&#039;2005-04-12&#039;,&#039;Shipped&#039;,NULL,406),(10403,&#039;2005-04-08&#039;,&#039;2005-04-18&#039;,&#039;2005-04-11&#039;,&#039;Shipped&#039;,NULL,201),(10404,&#039;2005-04-08&#039;,&#039;2005-04-14&#039;,&#039;2005-04-11&#039;,&#039;Shipped&#039;,NULL,323),(10405,&#039;2005-04-14&#039;,&#039;2005-04-24&#039;,&#039;2005-04-20&#039;,&#039;Shipped&#039;,NULL,209),(10406,&#039;2005-04-15&#039;,&#039;2005-04-25&#039;,&#039;2005-04-21&#039;,&#039;Disputed&#039;,&#039;Customer claims container with shipment was damaged during shipping and some items were missing. I am talking to FedEx about this.&#039;,145),(10407,&#039;2005-04-22&#039;,&#039;2005-05-04&#039;,NULL,&#039;On Hold&#039;,&#039;Customer credit limit exceeded. Will ship when a payment is received.&#039;,450),(10408,&#039;2005-04-22&#039;,&#039;2005-04-29&#039;,&#039;2005-04-27&#039;,&#039;Shipped&#039;,NULL,398),(10409,&#039;2005-04-23&#039;,&#039;2005-05-05&#039;,&#039;2005-04-24&#039;,&#039;Shipped&#039;,NULL,166),(10410,&#039;2005-04-29&#039;,&#039;2005-05-10&#039;,&#039;2005-04-30&#039;,&#039;Shipped&#039;,NULL,357),(10411,&#039;2005-05-01&#039;,&#039;2005-05-08&#039;,&#039;2005-05-06&#039;,&#039;Shipped&#039;,NULL,233),(10412,&#039;2005-05-03&#039;,&#039;2005-05-13&#039;,&#039;2005-05-05&#039;,&#039;Shipped&#039;,NULL,141),(10413,&#039;2005-05-05&#039;,&#039;2005-05-14&#039;,&#039;2005-05-09&#039;,&#039;Shipped&#039;,&#039;Customer requested that DHL is used for this shipping&#039;,175),(10414,&#039;2005-05-06&#039;,&#039;2005-05-13&#039;,NULL,&#039;On Hold&#039;,&#039;Customer credit limit exceeded. Will ship when a payment is received.&#039;,362),(10415,&#039;2005-05-09&#039;,&#039;2005-05-20&#039;,&#039;2005-05-12&#039;,&#039;Disputed&#039;,&#039;Customer claims the scales of the models don\&#039;t match what was discussed. I keep all the paperwork though to prove otherwise&#039;,471),(10416,&#039;2005-05-10&#039;,&#039;2005-05-16&#039;,&#039;2005-05-14&#039;,&#039;Shipped&#039;,NULL,386),(10417,&#039;2005-05-13&#039;,&#039;2005-05-19&#039;,&#039;2005-05-19&#039;,&#039;Disputed&#039;,&#039;Customer doesn\&#039;t like the colors and precision of the models.&#039;,141),(10418,&#039;2005-05-16&#039;,&#039;2005-05-24&#039;,&#039;2005-05-20&#039;,&#039;Shipped&#039;,NULL,412),(10419,&#039;2005-05-17&#039;,&#039;2005-05-28&#039;,&#039;2005-05-19&#039;,&#039;Shipped&#039;,NULL,382),(10420,&#039;2005-05-29&#039;,&#039;2005-06-07&#039;,NULL,&#039;In Process&#039;,NULL,282),(10421,&#039;2005-05-29&#039;,&#039;2005-06-06&#039;,NULL,&#039;In Process&#039;,&#039;Custom shipping instructions were sent to warehouse&#039;,124),(10422,&#039;2005-05-30&#039;,&#039;2005-06-11&#039;,NULL,&#039;In Process&#039;,NULL,157),(10423,&#039;2005-05-30&#039;,&#039;2005-06-05&#039;,NULL,&#039;In Process&#039;,NULL,314),(10424,&#039;2005-05-31&#039;,&#039;2005-06-08&#039;,NULL,&#039;In Process&#039;,NULL,141),(10425,&#039;2005-05-31&#039;,&#039;2005-06-07&#039;,NULL,&#039;In Process&#039;,NULL,119);]]></description>
            <dc:creator>Ramakant Magade</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sun, 05 Feb 2023 07:17:05 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,707234,707234#msg-707234</guid>
            <title>Continue Handler problem (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,707234,707234#msg-707234</link>
            <description><![CDATA[ Hi folks,<br />
<br />
I have getting a problem with my continuehandler. It is setting the vFInished value to 1 too early.<br />
<br />
Here is my code...<br />
<br />
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vfinished = 1;<br />
<br />
SET vfinished = 0;<br />
    <br />
read_loop: LOOP<br />
	FETCH shopDetailCursor INTO vStockID;<br />
		<br />
   <br />
	IF vfinished = 1 THEN<br />
	     LEAVE read_loop;<br />
	end if;<br />
<br />
		<br />
	-- Get Stock Item Cost<br />
        -- Debug code shows vfinished = 0 at this point<br />
        SELECT cost INTO vCost FROM MS1_stock WHERE ID = vStockID;<br />
        -- Debug code shows vfinished = 1 at this point. How come ??<br />
<br />
        <br />
<br />
        -- Do Other Stuff<br />
<br />
<br />
END Loop read_loop;<br />
		<br />
Any ideas what might cause this ?<br />
<br />
John]]></description>
            <dc:creator>John Noble</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Mon, 16 Jan 2023 19:13:20 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,707032,707032#msg-707032</guid>
            <title>Row not being added. But pkey is getting incremented (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,707032,707032#msg-707032</link>
            <description><![CDATA[ Hi folks,<br />
<br />
My stored procedure (see below) is set to just add a new row. When I call it with test data from WorkBench it works fine. But when I call it from my .NET program nothing is getting updated. However, it does increment the pKey field in the table.<br />
<br />
Any idea what might be causing this? Some sort of lock perhaps ?<br />
<br />
John<br />
<br />
CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_remittancesInsert`(<br />
IN p_vendorID varchar(7),<br />
IN p_vendorName varchar(100),<br />
IN p_address1 varchar(50),<br />
IN p_address2 varchar(50),<br />
IN p_town varchar(50),<br />
IN p_postcode varchar(15),<br />
IN p_documentNumber varchar(30),<br />
IN p_ref1 varchar(30),<br />
IN p_docType varchar(3),<br />
IN p_docDate date,<br />
IN p_payable decimal(14,2),<br />
IN p_balance decimal(14,2),<br />
IN p_remit decimal(14,2),<br />
IN p_invoiceCurrency varchar(3),<br />
IN p_paymentDate date<br />
)<br />
BEGIN<br />
<br />
		INSERT INTO remittances    (vendorID,    vendorName,   address1,   address2,   town,   postcode,   documentNumber,   ref1,   docType,   docDate,   payable,   balance,   remit,   invoiceCurrency,   paymentDate)<br />
						  VALUES (p_vendorID,  p_vendorName, p_address1, p_address2, p_town, p_postcode, p_documentNumber, p_ref1, p_docType, p_docDate, p_payable, p_balance, p_remit, p_invoiceCurrency, p_paymentDate);<br />
                          <br />
END]]></description>
            <dc:creator>John Noble</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Tue, 20 Dec 2022 10:26:14 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,706599,706599#msg-706599</guid>
            <title>Create TEMPORARY Table using dynamic SQL (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,706599,706599#msg-706599</link>
            <description><![CDATA[ Hi folks,<br />
<br />
I am trying to create a Temporary table using variables<br />
<br />
If I use:<br />
CREATE TEMPORARY TABLE tempTable SELECT * FROM myTable;<br />
it will work fine,<br />
<br />
Except, I don&#039;t know the name of the table in advance. That is passed into the sproc. <br />
<br />
So I need to use something more dynamic like<br />
<br />
SET @vTableName= CONCAT(&quot;tableName&quot;, variableName);<br />
SET @vSQL = CONCAT(&quot;SELECT * FROM &quot;, @vTableName);<br />
CREATE TEMPORARY TABLE tempTable @vSQL;<br />
<br />
Except this wont compile. <br />
<br />
Is there a way around this?<br />
<br />
Thanks,<br />
<br />
JOhn]]></description>
            <dc:creator>John Noble</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Tue, 20 Dec 2022 10:40:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,706533,706533#msg-706533</guid>
            <title>1287 Setting user variables within expressions is deprecated and will be removed in a future release (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,706533,706533#msg-706533</link>
            <description><![CDATA[ Hi! We use this technique to update ranking columns <br />
SET category_rank = (SELECT @i := @i + 1)  <br />
<br />
Now we&#039;ve been getting lots of these warnings:<br />
1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: &#039;SET variable=expression,<br />
<br />
How can I change the technique to avoid the warning? <br />
<br />
  CREATE TABLE `categories` (<br />
  `client_id` int NOT NULL,<br />
  `category_id` int NOT NULL DEFAULT &#039;0&#039;,<br />
  `category_rank` int DEFAULT NULL,<br />
  `index_low` int DEFAULT NULL,<br />
  `index_high` int DEFAULT NULL,<br />
  `category_color` varchar(45) DEFAULT NULL,<br />
  `category_name` varchar(100) DEFAULT NULL<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;<br />
<br />
INSERT INTO categories(client_id, category_id, category_rank, index_low, index_high, category_color, category_name) VALUES<br />
(100, 36, NULL, 0, 44, &#039;#006830&#039;, &#039;A&#039;),<br />
(100, 37, NULL, 45, 110, &#039;#FBB022&#039;, &#039;B&#039;),<br />
(100, 38, NULL, 111, 222, &#039;#F15800&#039;, &#039;C&#039;),<br />
(100, 39, NULL, 223, 400, &#039;#FE8011&#039;, &#039;D&#039;),<br />
(104, 1, NULL, 0, 50, &#039;#47AB5B&#039;, &#039;E&#039;),<br />
(104, 2, NULL, 51, 100, &#039;#47A1CB&#039;, &#039;F&#039;),<br />
(104, 3, NULL, 101, 200, &#039;#475FCB&#039;, &#039;G&#039;),<br />
(104, 4, NULL, 201, 400, &#039;#7147CB&#039;, &#039;H&#039;),<br />
(144, 21, NULL, 300, 6000, &#039;#47AB5B&#039;, &#039;I&#039;),<br />
(158, 15, NULL, 59, 99, &#039;#330000&#039;, &#039;J&#039;),<br />
(158, 23, NULL, 0, 11, NULL, &#039;K&#039;),<br />
(162, 16, NULL, 0, 50, &#039;#47AB5B&#039;, &#039;L&#039;),<br />
(162, 17, NULL, 51, 100, &#039;#47A1CB&#039;, &#039;M&#039;),<br />
(162, 18, NULL, 101, 200, &#039;#475FCB&#039;, &#039;N&#039;),<br />
(162, 19, NULL, 201, 400, &#039;#7147CB&#039;, &#039;O&#039;),<br />
(192, 40, NULL, 0, 44, &#039;#006830&#039;, &#039;P&#039;),<br />
(192, 41, NULL, 45, 110, &#039;#FBB022&#039;, &#039;Q&#039;),<br />
(192, 42, NULL, 111, 222, &#039;#F15800&#039;, &#039;R&#039;);<br />
<br />
Many thanks in advance]]></description>
            <dc:creator>M Z</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Wed, 19 Oct 2022 17:57:13 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,706471,706471#msg-706471</guid>
            <title>Understanding SIGINT, KILL, and DECLARE HANDLER (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,706471,706471#msg-706471</link>
            <description><![CDATA[ Hello,<br />
<br />
I&#039;m reading the documentation for MySQL 5.7 and I would like to know how to write a Stored Procedure that gracefully terminates when requested by the user. <br />
<br />
It seems like CTRL-C or SIGINT only kills the statements on the client end, and the statements continue to execute server side. <br />
<br />
How does the KILL command affect a stored procedure that is mid-transaction?<br />
Does it trigger the DECLARE HANDLER? If so, with what SQLSTATE?<br />
<br />
Thank you!]]></description>
            <dc:creator>Sam Sun</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Wed, 12 Oct 2022 07:31:09 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,706448,706448#msg-706448</guid>
            <title>ORDER BY clause in stored procedure (no replies)</title>
            <link>https://forums.mysql.com/read.php?98,706448,706448#msg-706448</link>
            <description><![CDATA[ Hello, I am new to MySQL and mightily struggling with a simple store procedure.<br />
<br />
The below compiles and runs fine with the expected results in Workbench: <br />
<br />
CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`(IN SORTORDER char(5))<br />
BEGIN<br />
SELECT * FROM mydictionary<br />
order by case SORTORDER<br />
when &#039;HWORD&#039; then mydictionary.HeadWord<br />
when &#039;RANK&#039; then mydictionary.Rank<br />
end;<br />
END<br />
<br />
However the same thing with additional ORDER BY conditions won&#039;t even compile:<br />
.....<br />
order by case SORTORDER<br />
when &#039;HWORD&#039; then mydictionary.HeadWord, mydictionary.Rank<br />
when &#039;RANK&#039; then mydictionary.Rank, mydictionary.HeadWord<br />
.....<br />
<br />
Workbench highlights the comma after &#039;mydictionary.HeadWord&#039; as the error. What is the correct syntax, or you just cannot have more than one ORDER BY condition? I have a feeling that there is a simple solution, but after hours of reading manuals and looking for examples and I still cannot tell what I am missing. I greatly appreciate if anybody could put me out of the misery.]]></description>
            <dc:creator>Ken Guiche</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sun, 09 Oct 2022 20:38:58 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,705269,705269#msg-705269</guid>
            <title>Stored Procedure inserting duplicate Rows (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,705269,705269#msg-705269</link>
            <description><![CDATA[ I have just inherited a system from the previous developer who has left the company.  We have a bug where very occasionally a stored procedure (shown below) will create two entries into a table instead of one.<br />
<br />
His verbal report to me when leaving is that he suspects it has to do with Atomisation, which I do not know much about.<br />
<br />
It does seem to come in waves.  So this week, we had it happen 3 times within 30 inserts (all running within one cursor - see below).  Prior to that it hadn&#039;t happened for several months - which is probably 5000 inserts.<br />
<br />
I suspect I need to use a transaction.  However I have very limited experience with Cursors, due to obsessively avoiding them in the past, and so am not sure how best to use a transaction with a cursor.<br />
<br />
Here is the stored procedure.  If you can see anything else that is wrong, please let me know.<br />
<br />
DELIMITER $$<br />
<br />
CREATE PROCEDURE `ProcessCSSPayment`( <br />
  IN ipClearingDocumentDate         DATE, <br />
  IN ipChildID                      VARCHAR(7) <br />
)<br />
BEGIN <br />
  DECLARE vPaymentItemID            INT; <br />
  DECLARE vFamilyIDNo               VARCHAR(7); <br />
  DECLARE vChildId                  VARCHAR(7); <br />
  DECLARE vChildIdInteger           INT; <br />
  DECLARE vDetail                   VARCHAR(120)    DEFAULT &quot;Direct Deposit CCS Payment&quot;; <br />
  DECLARE vShortDescription         VARCHAR(1)      DEFAULT &quot;G&quot;; <br />
  DECLARE vClearingDocumentDate     DATETIME; <br />
  DECLARE vClearingDocumentNumber   VARCHAR(12); <br />
  DECLARE vPaymentFiscalYear        VARCHAR(4); <br />
  DECLARE vAmount                   DECIMAL(12,2); <br />
  DECLARE vWEID                     INT; <br />
  DECLARE vWeekEnding               DATE; <br />
  DECLARE vdr02ID                   INT; <br />
  DECLARE vDone                     INT DEFAULT 0; <br />
 <br />
  DECLARE curPaymentItem CURSOR FOR <br />
  SELECT PH.ClearingDocumentNumber, <br />
         PH.ClearingDocumentDate, <br />
         PH.PaymentFiscalYear, <br />
         PI.id AS PaymentItemID, <br />
         PI.Amount, <br />
         CH.FamilyIDNo, <br />
         CH.childid, <br />
         CH.id AS childIdInteger, <br />
         WE.WEID, <br />
         WE.WeekEnd AS WeekEnding <br />
    FROM CCSPaymentItem PI <br />
         INNER JOIN CCSPayment PH <br />
            ON PI.PaymentID = PH.id <br />
         INNER JOIN CCSEnrolment ER <br />
            ON PI.EnrolmentID = ER.EnrolmentID <br />
         INNER JOIN children CH <br />
            ON ER.ChildID = CH.ID <br />
          LEFT JOIN weekendings WE <br />
            ON PI.SessionReportStartDate BETWEEN WE.WeekStart AND WE.WeekEnd <br />
   WHERE ISNULL(PI.dr02Id) <br />
     AND (ISNULL(ipClearingDocumentDate) OR PH.ClearingDocumentDate = ipClearingDocumentDate) <br />
     AND (ipChildID = &quot;&quot; OR CH.childId = ipChildID)<br />
     AND PI.EnrolmentID &lt;&gt; &#039;&#039;; <br />
 <br />
  DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = 1; <br />
 <br />
  OPEN curPaymentItem; <br />
 <br />
  PaymentItem_LOOP: LOOP <br />
    -- Fetch one record from CURSOR and set to some variable <br />
    -- (If not found then done will be set to 1 by continue handler) <br />
    FETCH curPaymentItem INTO vClearingDocumentNumber, <br />
                              vClearingDocumentDate, <br />
                              vPaymentFiscalYear, <br />
                              vPaymentItemID, <br />
                              vAmount, <br />
                              vFamilyIDNo, <br />
                              vChildId, <br />
                              vChildIdInteger, <br />
                              vWEID, <br />
                              vWeekEnding; <br />
 <br />
    IF vDone THEN <br />
      -- If done set to 1 then exit the loop else continue <br />
      LEAVE PaymentItem_LOOP; <br />
    END IF; <br />
 <br />
    IF EXISTS ( SELECT id <br />
                  FROM dr02 <br />
                 WHERE ChildIdInteger = vChildIdInteger <br />
                   AND childId        = vChildId <br />
                   AND PayId          = vClearingDocumentNumber <br />
                   AND DATE           = vClearingDocumentDate <br />
                   AND WEID           = vWEID <br />
                   AND WeekEnd        = vWeekEnding <br />
                   AND AMOUNT         = vAmount * -1 <br />
                   AND USER           = &quot;Admin&quot; <br />
                ) THEN <br />
 <br />
      ITERATE PaymentItem_LOOP; <br />
    END IF; <br />
 <br />
 <br />
    CALL Drsub_DrJnl(vFamilyIDNo, <br />
                     vDetail, <br />
                     vShortDescription, <br />
                     vClearingDocumentDate, <br />
                     0, <br />
                     vAmount * -1, <br />
                     0, <br />
                     0, <br />
                     &quot;Admin&quot;, -- UserName <br />
                     vdr02ID); <br />
 <br />
    UPDATE dr02 <br />
       SET ref = ID, <br />
           ChildIdInteger = vChildIdInteger, <br />
           childId        = vChildId, <br />
           PayId          = vClearingDocumentNumber, <br />
           WEID           = vWEID, <br />
           WeekEnd        = vWeekEnding <br />
     WHERE ID = vdr02ID; <br />
 <br />
    CALL Drsub_UpdateChildGovtAmounts(vWEID, vChildId); <br />
   <br />
    UPDATE CCSPaymentItem <br />
       SET dr02Id = vdr02ID <br />
     WHERE ID = vPaymentItemID; <br />
 <br />
  END LOOP PaymentItem_LOOP; <br />
 <br />
  -- Closing the cursor <br />
  CLOSE curPaymentItem; <br />
 <br />
  -- Calculate the CCSHourly <br />
  SET vWEID = (SELECT WE.WEID <br />
                 FROM weekendings WE <br />
                WHERE WE.WeekStart = (SELECT MAX(SR.SessionReportStartDate) <br />
                                        FROM CCSSessionReport SR <br />
                                       WHERE NOT ISNULL(SR.FeeReductionAmount))); <br />
                                       <br />
  UPDATE children CH <br />
         INNER JOIN dr02 D21 <br />
            ON CH.childid = D21.childid <br />
           AND D21.WEID = vWEID <br />
           AND D21.T1 = &quot;L&quot; <br />
         INNER JOIN dr02 D22 <br />
            ON CH.childid = D22.childid <br />
           AND D22.WEID = D21.WEID - 1 <br />
           AND D22.T1 = D21.T1 <br />
    SET CCSHourly = (IFNULL((-IFNULL(D21.Govt, 0)/D21.Units), 0) + IFNULL((-IFNULL(D22.Govt, 0)/D22.Units), 0)) / <br />
                      CASE WHEN ((CASE WHEN IFNULL((-IFNULL(D21.Govt, 0)/D21.Units), 0) = 0 THEN 0 ELSE 1 END) + <br />
                                 (CASE WHEN IFNULL((-IFNULL(D22.Govt, 0)/D22.Units), 0) = 0 THEN 0 ELSE 1 END)) = 0 <br />
                           THEN 1 <br />
                           ELSE ((CASE WHEN IFNULL((-IFNULL(D21.Govt, 0)/D21.Units), 0) = 0 THEN 0 ELSE 1 END) + <br />
                                 (CASE WHEN IFNULL((-IFNULL(D22.Govt, 0)/D22.Units), 0) = 0 THEN 0 ELSE 1 END)) END; <br />
 <br />
END$$]]></description>
            <dc:creator>Derek McKinnon</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 14 Jul 2022 17:41:39 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,705261,705261#msg-705261</guid>
            <title>Stored Procedure to create table (6 replies)</title>
            <link>https://forums.mysql.com/read.php?98,705261,705261#msg-705261</link>
            <description><![CDATA[ Hello all,<br />
<br />
I am attempting to create an SP that will take three params and create a table using the params as the schema.tableName.<br />
<br />
The purpose is to create many tables, all the same fields, but the names must change based on the date.  Before asking why, these tables are auto-generated and filled with raw machine data.  We are moving the tables to test them in another database, but doing so manually takes a lot of time.<br />
<br />
Here is the code I have so far, I have added the @ symbol in the PREPARE stmt because Mysql gave me an error if I didn&#039;t use it.<br />
<br />
CREATE PROCEDURE `param_test01`(IN p_schema varchar(30), IN p_year char(4), IN p_month char(2))<br />
BEGIN<br />
    DECLARE t_name varchar(50);<br />
    DECLARE k_name varchar(50);<br />
    DECLARE t_create text;<br />
    <br />
    set k_name = concat(&#039;sqlt_data_1_&#039;, p_year, &#039;_&#039;, p_month, &#039;t_stampndx&#039;);<br />
    <br />
    if length(p_month) &lt; 2 then <br />
		set p_month = concat(&#039;0&#039;,p_month);<br />
    end if;<br />
<br />
    set t_name = concat(p_schema, &#039;.&#039;, &#039;sqlt_data_1_&#039;, p_year, &#039;_&#039;, p_month);<br />
    set t_create = concat(&#039;create table &#039;, t_name, &#039; (<br />
		`tagid` int(11) NOT NULL DEFAULT &#039;&#039;0&#039;&#039;,<br />
	  `intvalue` bigint(20) DEFAULT NULL,<br />
	  `floatvalue` double DEFAULT NULL,<br />
	  `stringvalue` varchar(255) DEFAULT NULL,<br />
	  `datevalue` datetime DEFAULT NULL,<br />
	  `dataintegrity` int(11) DEFAULT NULL,<br />
	  `t_stamp` bigint(20) NOT NULL DEFAULT &#039;&#039;0&#039;&#039;,<br />
	  PRIMARY KEY (`tagid`,`t_stamp`),<br />
	  KEY k_name (`t_stamp`)<br />
    )ENGINE=InnoDB DEFAULT CHARSET=utf8;&#039;);<br />
    <br />
    prepare stmt from @t_create;<br />
    execute stmt;<br />
    deallocate prepare stmt;<br />
END<br />
<br />
Any ideas?<br />
<br />
Thank you]]></description>
            <dc:creator>Mike Demaris</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sat, 16 Jul 2022 02:34:07 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,704844,704844#msg-704844</guid>
            <title>Passing TableName to a Stored Procedure (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,704844,704844#msg-704844</link>
            <description><![CDATA[ I am trying to pass a table name to a stored procedure simple example code follows:<br />
<br />
DELIMITER //<br />
CREATE PROCEDURE myProcedure(IN tabName varchar(50))<br />
BEGIN<br />
<br />
SELECT tabName; -- Correctly outputs the expected value assigned to tabName<br />
<br />
SELECT ClientID FROM tabName limit 100; -- Throws error<br />
	<br />
END //<br />
DELIMITER ;<br />
<br />
The first select statement displays the value of the variable as expected but the second select statement throws the error: Table &#039;mydatabase.tabName&#039; doesn&#039;t exist]]></description>
            <dc:creator>Clive Morris</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 10 Jun 2022 16:09:18 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703449,703449#msg-703449</guid>
            <title>PHP mysql master detail part procedure (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,703449,703449#msg-703449</link>
            <description><![CDATA[ I am developing a online shopping web site. While the enquiry is raised i want to insert the master data (name, address, email etc...) in the master table and multiple detail data (itemid, Qty, Rate etc..) in the detail table. I plan to use stored procedure because master id is stored in the detail table. When use in online if multiple people raise order at a same time then no problem in number dublication.]]></description>
            <dc:creator>Jegatheesan S</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Mon, 14 Mar 2022 17:18:13 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703301,703301#msg-703301</guid>
            <title>Error Code: 1172. Result consisted of more than one row INSIDE A FUNCTION (3 replies)</title>
            <link>https://forums.mysql.com/read.php?98,703301,703301#msg-703301</link>
            <description><![CDATA[ Hello everybody thanks you in advance. I’m getting this error message when I run a user defined function .<br />
The function just read from a table the EURO exchange value for a certain date. There is a unique result for each date, but keep given me the message .<br />
Here is the code <br />
<br />
CREATE DEFINER=`myNestor`@`%` FUNCTION `EURO`(FEC DATE ) RETURNS decimal(11,2)<br />
BEGIN<br />
SET @TODAY=FEC;<br />
SELECT EURO FROM DATA.IYM WHERE DOER=@HOY INTO @RESULT ;<br />
RETURN @RESULT ;<br />
END]]></description>
            <dc:creator>Nestor Pedraza</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Mon, 14 Mar 2022 17:12:46 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703292,703292#msg-703292</guid>
            <title>Function problem (2 replies)</title>
            <link>https://forums.mysql.com/read.php?98,703292,703292#msg-703292</link>
            <description><![CDATA[ Call function (n1)<br />
How does one parameter pass in multiple strings<br />
Achieve the effect of in ()]]></description>
            <dc:creator>name name</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Sat, 05 Mar 2022 15:49:20 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703278,703278#msg-703278</guid>
            <title>Procedure Random Partial Failure (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,703278,703278#msg-703278</link>
            <description><![CDATA[ I have an event which kicks off a stored procedure at midnight to drop the oldest partition (180 Days old), and create a new partition (2 days into the future).  This maintenance task randomly started failing last week (2/19) for 2 of the 3 tables it updates.<br />
<br />
NOTE:  I am not the author of this procedure.<br />
<br />
MySQL Error Message:  <br />
2022-03-04T00:00:00.915128-05:00 64212 [ERROR] [MY-010045] [Server] Event Scheduler: [myuser@%][app.job_update_partitions] Error in list of partitions to DROP<br />
<br />
The interesting thing is that the event/procedure drops the 3 partitions correctly, but only only creates the new partition on the first table.  The second/third table do not get a new partition.<br />
<br />
<br />
call_log - drops oldest partition<br />
call_log - creates new partition<br />
<br />
cc_agent_log - drops oldest partition<br />
cc_agent_log - fails to create newest<br />
<br />
cc_queue_log - drops oldest partition<br />
cc_queue_log - fails to create newest<br />
<br />
<br />
EVENT:<br />
Delimiter $$<br />
     Create Event `Job_Update_Partitions`<br />
          On Schedule<br />
               Every 1 Day<br />
               Starts Curdate() + Interval &#039;0:00&#039; Hour_Minute<br />
          Do<br />
               Begin<br />
                    call Update_Partitions(&#039;call_log&#039;);<br />
                    call Update_Partitions(&#039;cc_agent_log&#039;);<br />
                    call Update_Partitions(&#039;cc_queue_log&#039;);<br />
               End<br />
          $$<br />
Delimiter ;<br />
<br />
<br />
Procedure:<br />
DELIMITER $$<br />
     DROP PROCEDURE IF EXISTS `UPDATE_PARTITIONS`$$<br />
     CREATE PROCEDURE UPDATE_PARTITIONS(VAR_TABLE VARCHAR(25) )<br />
     BEGIN<br />
          DECLARE DAYSTOKEEP INT DEFAULT 180;<br />
          DECLARE CREATEINDAYS INT DEFAULT 2;<br />
<br />
          DECLARE MYDATE DATE;<br />
          DECLARE MYDATEPLUS1 DATE;<br />
          DECLARE MYDATEMINUS DATE;<br />
          DECLARE Y CHAR(2);<br />
          DECLARE M CHAR(2);<br />
          DECLARE D CHAR(2);<br />
          DECLARE DATE_STRING VARCHAR(100);<br />
<br />
          DECLARE PARTITION_NAME VARCHAR(100);<br />
          DECLARE NO_MORE_ROWS BOOLEAN;<br />
          DECLARE ROW_COUNT INT DEFAULT 0;<br />
          DECLARE NUM_ROWS INT DEFAULT 0;<br />
<br />
          SET MYDATE=DATE_ADD(CURDATE(), INTERVAL CREATEINDAYS DAY);<br />
          SET Y=DATE_FORMAT(MYDATE, &#039;%y&#039;);<br />
          SET M=DATE_FORMAT(MYDATE, &#039;%m&#039;);<br />
          SET D=DATE_FORMAT(MYDATE, &#039;%d&#039;);<br />
          SET DATE_STRING=CONCAT(&#039;p&#039;, Y, M, D);<br />
<br />
          SET MYDATEPLUS1=DATE_ADD(CURDATE(), INTERVAL (CREATEINDAYS + 1) DAY);<br />
<br />
          SET @sql := CONCAT(&#039;ALTER TABLE &#039;, VAR_TABLE, &#039; ADD PARTITION ( PARTITION &#039;,<br />
                              DATE_STRING, &#039; VALUES LESS THAN (&#039;,<br />
                              TO_DAYS(MYDATEPLUS1),<br />
                              &#039;));<br />
                    &#039;);<br />
          PREPARE stmt FROM @sql;<br />
          EXECUTE stmt;<br />
          DEALLOCATE PREPARE stmt;<br />
<br />
          SET MYDATEMINUS=DATE_SUB(CURDATE(), INTERVAL DAYSTOKEEP DAY);<br />
          SET Y=DATE_FORMAT(MYDATEMINUS, &#039;%y&#039;);<br />
          SET M=DATE_FORMAT(MYDATEMINUS, &#039;%m&#039;);<br />
          SET D=DATE_FORMAT(MYDATEMINUS, &#039;%d&#039;);<br />
          SET DATE_STRING=CONCAT(&#039;p&#039;, Y, M, D);<br />
<br />
          SET @sql := CONCAT(&#039;ALTER TABLE &#039;, VAR_TABLE, &#039; DROP PARTITION &#039;, DATE_STRING);<br />
          PREPARE stmt FROM @sql;<br />
          EXECUTE stmt;<br />
          DEALLOCATE PREPARE stmt;<br />
<br />
     END$$<br />
DELIMITER ;<br />
<br />
<br />
I upgraded the mysql server from 8.0.21 to 8.0.26, which still has the problem.<br />
<br />
My open_files_limit is way higher than the number of tables on the server.<br />
<br />
SHOW VARIABLES LIKE &#039;open_files_limit&#039;;<br />
+------------------+-------+<br />
| Variable_name    | Value |<br />
+------------------+-------+<br />
| open_files_limit | 10000 |<br />
+------------------+-------+<br />
<br />
<br />
Looking for suggestions/recommendations to troubleshoot/debug.<br />
<br />
Thanks,<br />
Dave]]></description>
            <dc:creator>David Sarvai</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 04 Mar 2022 18:21:22 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703253,703253#msg-703253</guid>
            <title>xml into store procedure (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,703253,703253#msg-703253</link>
            <description><![CDATA[ I need to process an xml parameter inside a store procedure for affect tables inside mysql. can someone help me with this case and provide examples? thanks a lot.<br />
elkin, Medellin, colombia.]]></description>
            <dc:creator>Elkin Fernando Ortiz</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 03 Mar 2022 22:22:26 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,703015,703015#msg-703015</guid>
            <title>REGEXP_SUBSTR function missing (5 replies)</title>
            <link>https://forums.mysql.com/read.php?98,703015,703015#msg-703015</link>
            <description><![CDATA[ scenario:  mysql community server 5.7<br />
Centos 7<br />
<br />
REGEXP_SUBSTR function missing<br />
<br />
Our devs have reported that when trying to use REGEXP_SUBSTR function missing on a UAT db instance we have the function is missing.<br />
<br />
The live equivalent (same OS &amp; mysql version) does have this fucntion.<br />
<br />
REGEXP_SUBSTR function missing is an &quot;in built&quot; mysql provision from what i can gather, but what doesnt appear clear is how it has &quot;disappeared&quot; recently from this UAT mysql instance, and how to get it back.<br />
<br />
the UAT server was last patched Jan 18th 2022, the live server Dec 15th 2021.<br />
<br />
Exact version are<br />
<br />
UAT: 5.7.36<br />
LIVE: 5.7.36<br />
<br />
so it doesnt appear to be a mysql patch issue.<br />
<br />
Anyway, ignoring for now how it happened, how do I get it back?<br />
<br />
cheers!<br />
<br />
Ian]]></description>
            <dc:creator>ian diddams</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Thu, 17 Feb 2022 15:49:40 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?98,702928,702928#msg-702928</guid>
            <title>stored procedure adds empty fields when creating new user (1 reply)</title>
            <link>https://forums.mysql.com/read.php?98,702928,702928#msg-702928</link>
            <description><![CDATA[ Hi,<br />
i have a stored procedure that im testing inside mysqlworkbench, im getting new user created successfly after executing the SP but with empty values for username email HashPass and SaltPass, <br />
any ideas what will be causing this <br />
Ps: the stored procedure works perfectly if i don&#039;t use concat<br />
<br />
here is <br />
CREATE DEFINER=`admin`@`%` PROCEDURE `CreateUser`(IN dbName VARCHAR(50),IN UserName varchar(250),IN Email varchar(250),IN HashPass varchar(250),IN SaltPass varchar(250))<br />
BEGIN<br />
 <br />
SET @_dbName = dbName;<br />
 <br />
	SET @query = CONCAT(&#039;INSERT INTO &#039;,@_dbName, &#039;.Users (UserName,Email,HashPass,SaltPass,CreationDate) <br />
    VALUES(UserName, Email, HashPass, SaltPass, NOW());&#039;);<br />
	PREPARE stmt FROM @query;<br />
	EXECUTE stmt;<br />
	DEALLOCATE PREPARE stmt;<br />
    <br />
END<br />
<br />
test<br />
call ProjectsDB.CreateUser(&#039;kiwi&#039;, &#039;test&#039;, &#039;test@gmail.com&#039;, &#039;qsaaksjhaslja&#039;, &#039;jbkasakskajka&#039;);]]></description>
            <dc:creator>badr douah</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Wed, 16 Feb 2022 16:47:28 +0000</pubDate>
        </item>
    </channel>
</rss>
