Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    9

    Unhappy Unanswered: How to enter this command line sql statement...???

    I am trying to use a program called ODBCVIEW to query a database from the command line, and write it to text file. The instructions look easy, But I am illiterate to translating command line syntax.
    I am not sure if I use the ">" , "[", etc... or if I leave them out. Can some one show me exactly how the finished code is supposed to look (in laymans)...

    The program I am using to query the DB is called ODBCVIEW. Here is a link to the page with the syntax(located at the bottom) - http://www.slik.co.nz/HTML_help/odbc_view.htm

    ...and I have also pasted it below:

    -COPIED FROM WEBSITE:
    ODBCView also supports a non-interactive command line mode to execute a query and save the results to a text file. The syntax is as follows:

    ODBCView.exe <DSN=DataSourceName;UID=User;PWD=Password> [<SQLScript.sql>] [<OutputFile.htm|csv|txt>]

    Where:

    DataSource
    The desired datasource name.

    UID
    An optional user name to logon to the database

    PWD
    An optional user password

    SQLScript
    The query to execute.

    OutputFile
    The path to the output file. The files extension determines the format. Use htm or html to HTML, csv for CSV.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    If you are only trying to query a database and write the results to a file, better try WinSQL.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jun 2004
    Posts
    9

    Talking Thank you!

    Just what I was looking for!

    I'm installing it now - Does it have a 'command-line' mode?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •