title: Script to create multiple stored procedures
body: <p>I am testing a scenario with a high number of stored procedures in mssql.  Is there a way to script creating ~5000 stored procedures?  My attempts have been futile.</p>
  <pre><code>declare @id int 
  select @id = 1
  while @id &gt;=1 and @id &lt;= 1000
  begin
      CREATE PROCEDURE 'SelectAllCustomer'+ convert(varchar(5))  AS SELECT * FROM Customers
      select @id = @id + 1
  end
  go
  </code></pre>
  <p>Fails with:</p>
  <blockquote>
  <p>Msg 156, Level 15, State 1, Line 7 Incorrect syntax near the keyword
  'PROCEDURE'.</p>
  </blockquote>
  <p>Even just adding a parameter to the procedure name is failing:</p>
  <pre><code>CREATE PROCEDURE 'SelectAllCustomer'+ 'test' AS SELECT * FROM Customers
  </code></pre>
  <p>fails with:</p>
  <blockquote>
  <p>Msg 102, Level 15, State 1, Line 1 Incorrect syntax near
  'SelectAllCustomer'.</p>
  </blockquote>