Re: Sql Query

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Barney (anonymous_at_discussions.microsoft.com)
Date: 08/20/04


Date: Fri, 20 Aug 2004 05:03:40 -0700

We dont have an SQL server - we have an AS400 running
DB2. Where can I download osql.exe?
>-----Original Message-----
>Use osql.exe in your batch, which you should have from
any SQL Server
>installation, including the "client tools only" install.
>
>osql -?
>
>usage: osql [-U login id] [-P
password]
> [-S server] [-H hostname] [-E
trusted connection]
> [-d use database name] [-l login timeout] [-t
query timeout]
> [-h headers] [-s colseparator] [-w
columnwidth]
> [-a packetsize] [-e echo input] [-I
Enable Quoted
>Identifiers]
> [-L list servers] [-c cmdend] [-D ODBC
DSN name]
> [-q "cmdline query"] [-Q "cmdline query" and exit]
> [-n remove numbering] [-m errorlevel]
> [-r msgs to stderr] [-V severitylevel]
> [-i inputfile] [-o outputfile]
> [-p print statistics] [-b On error batch abort]
> [-O use Old ISQL behavior disables the following]
> <EOF> batch processing
> Auto console width scaling
> Wide messages
> default errorlevel is -1 vs 1
> [-? show syntax summary]
>
>Ray at work
>
>"Patrick Bonneau" <anonymous@discussions.microsoft.com>
wrote in message
>news:84b001c48525$712aefe0$a401280a@phx.gbl...
>> Is there away to make a sql query with a batch file?
>>
>> If so, what is the utility for doing this?
>>
>
>
>.
>



Relevant Pages

  • Re: GO ...?
    ... client side command, which makes sense. ... I don't use GO statements as I have always assumed sql server will process ... I be concerned with processing it all as one 'batch' (i.e., ... there are also cases where you must not put commands ...
    (microsoft.public.sqlserver.programming)
  • Re: How can I force a pause in program execution?
    ... The problem is that the table creation isn't complete before ... > insert command fires. ... It is a batch delimiter recognized by SQL ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: testing @@error in SP
    ... Some errors in SQL Server cause the abortion of the T-SQL batch they are. ... the batch and can be handled with an error handler. ...
    (microsoft.public.sqlserver.programming)
  • Re: Inserting Multiple Rows
    ... In addition to that [BCP, BULK INSERT, DTS], it might be worth mentioning below two things. ... Group several INSERT in the same transaction. ... Each batch requires a network roundtrip, ... mean what we see as "GO" in Query Analyzer and the method you use in ADO.NET to send the command to SQL Server ...
    (microsoft.public.sqlserver.programming)
  • Re: Inserting Multiple Rows
    ... In addition to that [BCP, BULK INSERT, DTS], it might be worth mentioning below two things. ... Group several INSERT in the same transaction. ... Each batch requires a network roundtrip, ... mean what we see as "GO" in Query Analyzer and the method you use in ADO.NET to send the command to SQL Server ...
    (microsoft.public.dotnet.framework.aspnet)