title: Practical Development with VS2012, SSDT, and TFS
body: <p>With SSDT/VS2012/TFS, stored procedures are saved as CREATE scripts.</p>
  
  <p>I also have database references, which I use in some scripts like
  select * from [$(MyOtherDatabase)].[dbo].[someTable]</p>
  
  <p>If I open a stored procedure in my project and execute it, it executes the CREATE script, which will error out. Also, variables such as $(MyOtherDatabase) do not get resolved.</p>
  
  <p>What is the best way to deal with these problems?</p>
  
  <p>Do I manually change the script to an ALTER? Do I manual replace all my variables with their values? And then when I check the procedure back into TFS, do I have to reverse all those operations? Or do I need to do a publish for everything?</p>