title: OUTPUT TO FILE LOCAL SYBASE IQ 16
body: <p>I'm trying to write my existing tables to files and save it locally.</p>
  
  <p>I'm using T-SQL with SQuirrel JDBC Connection to Sybase</p>
  
  <p>I tried the following Code to write results into a file:</p>
  
  <pre><code>SELECT * FROM date_dimension; 
  OUTPUT TO "C:\Users\temp\output.txt" FORMAT ASCII;
  </code></pre>
  
  <p>I dont know why it doesn't work but I get a Syntax error while trying this.</p>
  
  <blockquote>
    <p>Error: SQL Anywhere Error -131: Syntax error near 'OUTPUT' on line 1
    SQLState:  42W04
    ErrorCode: 102</p>
  </blockquote>
  
  <p>Can someone see a mistake in the code? Is there another way to write into file from Sybase IQ?</p>
  
  <p>I'm new to all this Tools and I'm sry for such a question </p>
  
  <p>Please help me :)</p>
  
  <pre><code>CREATE TABLE DATE_DIMENSION
  (   [DateKey] INT primary key, 
      [Date] DATETIME,
      [FullDateUK] CHAR(10), -- Date in dd-MM-yyyy format
      [FullDateUSA] CHAR(10),-- Date in MM-dd-yyyy format
  }
  </code></pre>