Note that there are some explanatory texts on larger screens.

plurals
  1. POBuilding and Testing with MySQL Workbench for SSMS People
    primarykey
    data
    text
    <p>I am great with Microsoft's SQL Server and SQL Server Management Studio (SSMS).</p> <p>I'm trying to get things I used to do there to work in MySQL Workbench, but it is giving me very unhelpful errors.</p> <p>Currently, I am trying to write an <code>INSERT</code> statement. I want to declare my variables and test it with a few values, then turn the end result into a stored procedure.</p> <p>Right now, I have a syntax error that is not allowing me to continue, and the error message is not helpful either:</p> <blockquote> <p>syntax error, unexpected DECLARE_SYM</p> </blockquote> <p>There is no error list at the bottom and no way to copy the text of that error to the clipboard, so it all has to be studied on one screen, then flip to this screen so I can write it down.</p> <p><strong>Irritating!</strong></p> <p>The <a href="http://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial.html" rel="nofollow noreferrer">MySQL documentation</a> surely has what I'm looking for, but I can learn much faster by doing than spending weeks reading their online manual.</p> <pre><code>DELIMITER $$ declare cGroupID char(6) DEFAULT = 'ABC123'; declare subGroupRecords int; declare nDocTypeID int(11); declare bDocActive tinyint(1) DEFAULT '1'; declare cDocID varchar(256) DEFAULT NULL; insert into dbo_connection.documents (group_id, subgroup_id, type_id, active, title, doc_id, priority, ahref, description, last_modified) values (cGroupID,cSubGroupID,nDocTypeID,bDocActive,cTitle,cDocID,0,ahref1, docDesc,NOW()); select * from dbo_connection.documents where group_id='ABC123'; END </code></pre> <p><img src="https://i.stack.imgur.com/YLuAq.jpg" alt="screenshot"></p> <p>So, for right now, I'm looking for why MySQL does not like my <code>declare</code> statement.</p> <p>For the long term, I'm interested in finding a short article that shows a cookbook approach to doing some of the basic tasks that SQL developers would need (i.e. skips the Hello World program and discussion on data types).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload