The information in this article applies to:
SUMMARYISQL and OSQL can issue can issue operating system commands by starting a line with two exclamation points (!!) followed by the command. However, these commands are unconditionally run when encountered by ISQL or OSQL and they cannot take part in the Transact-SQL control-of-flow language. MORE INFORMATION
For example, if a file called TEST.SQL is created with the following
contents
then the operating system command specified on the second line will always be run by ISQL, even though the command is apparently inside an IF control-of-flow condition. Note that the SELECT statement is part of the control of flow and will not be run in this case because 1=2 evaluates to FALSE. When running the following ISQL /U<login> /P<password> /S<server> /itest.sql the output that might be returned is:
Additional query words: Windows NT
Keywords : kbtool SSrvISQL SSrvProg SSrvTran_SQL SSrvWinNT |
Last Reviewed: November 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |