I'm trying to execute some SQL file that contain a lot of SQL files inside. Just as a main.sql
that contains all the others that should be executed.
main.sql :
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
SET ANSI_PADDING ON;
@new_instance.sql
@new_instance_tbl.sql
@new_instance_views.sql
@new_instance_tbl_configs.sql
When I open the file in my SQL Server, the red underline appears:
Incorrect syntax near '@new_instance.sql'
and then if I try to execute this, the same failure appears, so...
How can I execute different "included" .sql
files from one main SQL file?