title: This Stored Procedure from MSSQL did not work after being converted to MySql
body: <p>After converting this code from MSSQL to MySql it refuse to run, the error is Variable not declared.</p>
  <p>This is the Code from MSSQL</p>
  <pre><code>CREATE PROC [dbo].[spp_report_connection_setup]
  @CompanyCode varchar(50)
  As
  Begin
  
  SELECT Connection = 'Data Source='+ServerName+';Initial Catalog='+DatabaseName+';User ID='+UserName+';Password='+Password,
      CompanyName = (select top 1 Name from cor_company where Code = @CompanyCode)
    FROM [dbo].[cor_database]
    WHERE CompanyCode = @CompanyCode
  
  End
  </code></pre>
  <p>This is the code after being converted but it says. No Variable declared for Connection</p>
  <pre><code>CREATE PROCEDURE spp_report_connection_setup (
  p_CompanyCode varchar(50))
  Begin
  
  -- SQLINES LICENSE FOR EVALUATION USE ONLY
  SELECT CONCAT('Data Source=',ServerName,';Initial Catalog=',DatabaseName,';User ID=',UserName,';Password=',Password),
   (select top 1 Name from cor_company where Code = p_CompanyCode) INTO Connection, CompanyName
    FROM cor_database
    WHERE CompanyCode = p_CompanyCode;
  
  End;
  </code></pre>
  <p>This is what I have adjusted. but it still gives error saying check your syntax for this version.</p>
  <pre><code>CREATE PROCEDURE spp_report_connection_setup (
  p_CompanyCode varchar(50))
  Begin
  declare Connection varchar(100); declare CompanyName varchar(100);
  -- SQLINES LICENSE FOR EVALUATION USE ONLY
  SELECT CONCAT('Data Source=',ServerName,';Initial Catalog=',DatabaseName,';User ID=',UserName,';Password=',Password),
   (select Name from cor_company where Code = p_CompanyCode Limit 1) INTO Connection, CompanyName
    FROM cor_database
    WHERE CompanyCode = p_CompanyCode;
  
  End;
  </code></pre>
  <p>Please What am I missing</p>