Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 call sql file within sql file

Author  Topic 

ag_ss
Starting Member

48 Posts

Posted - 2006-03-31 : 02:19:18
in oracle we run sql files like this

@xxx.sql

what about ms sql

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-31 : 02:59:18
Look for osql in sql server help file


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ag_ss
Starting Member

48 Posts

Posted - 2006-03-31 : 03:35:52
and how to give file path
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-31 : 03:58:18
Like this

osql -E -i "F:\query.txt" -o "F:\result.txt"


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ag_ss
Starting Member

48 Posts

Posted - 2006-03-31 : 04:02:10
actually i have made sql file which is calliung to other sql files and while running with osql it gives error
Could not find stored procedure
i dotn know how to give path to other sql file so it can find it
Go to Top of Page
   

- Advertisement -