July 2, 2004 at 2:20 pm
I am working on a project for my college as a student programmer that requires me to use Microsoft SQL Server 2000. They gave me a developer's edition to install on my computer. I am supposed to develop a SQL script and email it to them. This is my first time using MSSQL Server 2K.
I know SQL, so I have created a simple text file with the extension .sql that creates a table. I cannot figure out how to run this script in SQL Server.
What do I need to do to run my SQL script in SQL Server? Any help you can give this newbie would be very appreciated.
July 2, 2004 at 6:07 pm
Run query analyzer (isqlw.exe) and load the script (File Open, cut and paste, whatever) and then there is a green arrow to execute it. You can also press CTRL-E or ALT-X.
http://www.sqlservercentral.com/columnists/sjones/queryanalyzertricks.asp
http://www.sqlservercentral.com/columnists/bkelley/qa2k_1.asp
http://www.sqlservercentral.com/columnists/bkelley/qa2k_2_1.asp
http://www.sqlservercentral.com/columnists/bkelley/qa2k_3_1.asp
July 5, 2004 at 9:34 pm
assuming you're trying to run the script on your computer, the simplest way is from the command line:
C:\>osql -E -d mydatabase -i mysqlfile.sql
...of course, this implies that
C:\program files\microsoft sql server\80\tools\binn\
is in your $PATH...
July 6, 2004 at 3:30 am
In QA
'You can also press CTRL-E or ALT-X.'
Or F5
July 13, 2004 at 12:28 pm
Thanks, guys. I was able to do it with the Query Analyzer.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy