TransactSQL to run another TransactSQL script

后端 未结 6 890
逝去的感伤
逝去的感伤 2020-12-01 03:19

I have 10 transact SQL scripts that each create a table and fill it with data.

I am attempting to create 1 master sql script that will run each of the 10 other scrip

6条回答
  •  死守一世寂寞
    2020-12-01 04:02

    I find it useful to define a variable with the path, if I want to execute a set of scripts, say to run a test, something like: :setvar path "C:\code\branch-qa" :r $(path)\tables\client.sql :r $(path)\tables\item.sql :r $(path)\proc\clientreport.sql exec clientreport

提交回复
热议问题