title: sql modify file statement
body: <p>I'm having a SQL issue and have tried multiple combinations to no avail. I've tried commas, and also semicolons, after the first two ), all three ), just the last ), on all of these. No such luck. Please help me fix the query. Thanks in advance!</p>
  
  <p>I have done due diligence and came across several sites (I can only post two links because of reputatoin) these:
  <a href="https://stackoverflow.com/questions/8837207/sql-server-create-database-using-script-how-to-create-database-at-default-path">Create database using script at the default path?</a>
  <a href="http://www.sqlteam.com/forums/topic.asp?topic_id=148732" rel="nofollow noreferrer">http://www.sqlteam.com/forums/topic.asp?topic_id=148732</a></p>
  
  <pre><code>USE master
  GO
  ALTER DATABASE location_cust_db
  MODIFY FILE
  (
      NAME = location_cust_db_data1,
      MAXSIZE = UNLIMITED,
  )
  (
      NAME = location_cust_db_data2,
      MAXSIZE = UNLIMITED,
  )
  (
      NAME = location_cust_db_data3,
      MAXSIZE = UNLIMITED,
  )
  GO
  </code></pre>
  
  <hr>
  
  <pre><code>USE master
  GO
  ALTER DATABASE location_cust_db
  MODIFY FILE (NAME = location_cust_db_data1, MAXSIZE = UNLIMITED)
  MODIFY FILE (NAME = location_cust_db_data2, MAXSIZE = UNLIMITED)
  MODIFY FILE (NAME = location_cust_db_data3, MAXSIZE = UNLIMITED)
  GO
  </code></pre>
  
  <hr>
  
  <p>THIS WORKS, but very cumbersome to do 20 files.</p>
  
  <pre><code>USE master
  GO
  ALTER DATABASE location_cust_db
  MODIFY FILE
  (NAME = location_cust_db_data1,
  MAXSIZE = UNLIMITED)
  
  
  USE master
  GO
  ALTER DATABASE location_cust_db
  MODIFY FILE
  (NAME = location_cust_db_data2,
  MAXSIZE = UNLIMITED)
  GO
  
  USE master
  GO
  ALTER DATABASE location_cust_db
  MODIFY FILE
  (NAME = location_cust_db_data3,
  MAXSIZE = UNLIMITED)
  GO
  </code></pre>