title: Creating Stored Procedure Error Sybase
body: <p>I'm trying to create a stored procedure in a Sybase database that is called in Java, and take input arguments that populates 2 separate tables; some arguments go into both, some go only into one of the tables. </p>
  
  <p>Here is my stored procedure code: </p>
  
  <pre><code>Create procedure dbo.ps_bau_insert (in userID varChar(8), in busReason varChar(800), in weekID Integer,
                                  in qScript varChar(800), in success BIT, in rowsAffected varChar(100))
  
              BEGIN
  
              Insert into dbo.tbau_request_details 
              (weekID, userID, Date, qScript, BusReason, Success, Rows) 
              values (weekID, userID, getDate(), qScript, busReason, success, rowsAffected)
              Insert into dbo.tbau_request_cm
              (userID, Date, BusReason, Success, Rows)
              values (userID, getDate(), busReason, success, rowsAffected);
              End 
  </code></pre>
  
  <p>I'm getting the error: </p>
  
  <pre><code>Error report -
  Incorrect syntax near the keyword 'BEGIN'.
  </code></pre>
  
  <p>As far as I can see (by looking at the sybase documentation) the syntax is correct; the error statement says otherwise. Can someone help me see what is incorrect here?</p>
  
  <p>Thanks!</p>