• RandomStream - Monday, January 8, 2018 10:55 AM

    What is I want to script a long list of tables but not all tables?
    It would be helpful if you could allow user to populate a target file with all answers supplied.

    For instance:

    <target
      ServerName="myserver",
      Database="mytestdb",
      SchemaFlag="Y",
      DataFlag="Y",
      IndexFlag="Y",
      ForeignKeyFlag="Y",
      ...>
      <TableList Schemaname="DBO">table1, table2</TableList>
      <TableList Schemaname="Finance">fin_table1, fin_table2</TableList>
      <TableList Schemaname="Sales">sales_table1, sales_table2</TableList>
    </target>

    Ditto: And what if I wanted to generate scripts of all tables in a database? I see that this does not work on views - only on tables, or am I doing something wrong? 
    With that aside, Great article. It is simple to use and it actually works right out of the box. So many samples I see online don't work and require a bit of tweaking or a complete re-write of the code. But on this site, things just work!
    And that's why I love this web-site. 
    It's my one-stop-shop for all things SQL.

    Aubrey W Love
    aka: PailWriter
    https://www.aubreywlove.com/