Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running SQL script 1

Status
Not open for further replies.

aharrisreid

Programmer
Nov 17, 2000
312
GB
Hi,

I have a .sql script to create SQL tables, but I am using MSDE instead of SQL-server. How can I run the script using T-SQL syntax?

Thanks,
Alan
 
Use the OSQL command flag -i.

For example, let's say your script is saved as:
C:\Programs\SQLScripts\MyScript.sql

You would run:

C:\> osql -E -i C:\Programs\SQLScripts\MyScript.sql

The -E means you are using a trusted connection.

Refer to the BOL and look up OSQL for more information.

-SQLBill

BOL=Books OnLine=Microsoft SQL Server's HELP
Installed as part of the Client Tools
Found at Start>Programs>Microsoft SQL Server>Books OnLine

Posting advice: FAQ481-4875
 
SQLBill, thanks for the reply.

>Refer to the BOL and look up OSQL for more information.

I am using MSDE, not SQL-Server, so BOL is not installed AFAIK. Do you know of any other resource (on the web, perhaps) worth reading?

Regards,
Alan
 
SQLBill,

That little piece of info just opened up a whole new outlook for me in ref to MSDE.

Thanks

Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top