title: Can I create a VIEW that has a dynamic name in another DB with MS SQL?
body: <p>I found strange rules in MS SQL CREATE VIEW syntax.
  It must be on the first line of query batch processing and it must be created in the current database.</p>
  
  <p>I should make VIEWs that have dynamic name described by string variables
  (type: VARCHAR or NVARCHAR). And those VIEWs should be created in other databases.</p>
  
  <p>Because of the rule, CREATE VIEW statement must be on the first line of query batch processing, it cannot be after USE statement.
  So, I tried to change databases with USE &amp; GO statement. But GO statement seemed to make clear all the variables. Therefore they are not available that describe VIEW name after GO statement.</p>
  
  <p>Do you have any opinon for me?
  And if you know the reasons of CREATE VIEW syntax rules, please tell me.</p>
  
  <hr>
  
  <p>Oh~, Sorry. I missed one thing. The names of databases are also dynamic.
  And VIEWs, I want to make, not only should access tables of other databases
  but also shoule be created in other databases.</p>
  
  <p>Though I don't know OLAP well, I think this situation is involved OLAP.</p>