There is no T-SQL command to read a script file and execute it. We can use isql.exe and osql.exe to execute a script file from T-SQL.Just like this.. EXEC master..xp_cmdshell 'osql -S -Usa -P -ic:MyTable.sql -n' EXEC master..xp_cmdshell 'isql -S -Usa -P -ic:MyTable.sql -n' Harinatha Reddy Gorla MCSD,MCDBA Software Engineer Smart Software Technologies, Hyderabad, India
|