Try using osql . It can be a life saver. Here's an example of the most common usage:
osql -E -S myMSSQLServerName /* This uses windows authentication to connect to a server */
osql -? /* lists all the switches available to use with osql */
Once you see the SQL prompt (1> ) , you can interact with the server.
1> USE myDatabaseName
2> GO
3> SELECT col1, col2
4> FROM myTable
5> GO
6>
7> EXIT
Here's a link or two to get you started.
http://msdn.microsoft.com/en-us/library/aa214012(v=sql.80).aspx /* options available */
http://msdn.microsoft.com/en-us/library/aa213088(v=sql.80).aspx /* accessing data through osql */
osql -E -S myMSSQLServerName /* This uses windows authentication to connect to a server */
osql -? /* lists all the switches available to use with osql */
Once you see the SQL prompt (1> ) , you can interact with the server.
1> USE myDatabaseName
2> GO
3> SELECT col1, col2
4> FROM myTable
5> GO
6>
7> EXIT
Here's a link or two to get you started.
http://msdn.microsoft.com/en-us/library/aa214012(v=sql.80).aspx /* options available */
http://msdn.microsoft.com/en-us/library/aa213088(v=sql.80).aspx /* accessing data through osql */