.net - TSQL command to call *.sql files -


I have several * .sql files to create a new database with script and tablets and sprocs.

What is a way to create a TSQLLL script that runs from the SSL query analyzer, which can call * .sql files, respectively?

Example: Call Script 01; Call script 02; Call script 03; Sorry, but I was not able to express my problem properly before.

I need to create a db with several tables, at this time all the scripts are in a unique file (very long).

I use MS Management Studio to run a script in the query editor to create a database.

Because this script is too long, I was thinking of dividing it into separate pieces.

So I have a main script that will order execution of separate scripts to run. For example

script 1 script2 script3

etc

Do you know it hot to do in MS SQL 2008 in TSQL. Thanks once again

I use SQL Server 2008

In SSMS Use SqlCmd mode:

: r file name

Sure it works in question analyzer Does.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -