Interactive SQL enhancements

Sybase IQ 12.6 includes many enhancements to Interactive SQL (Java), also called dbisql. For details on Interactive SQL, see Chapter 2, “Using Interactive SQL (dbisql)” in Sybase IQ Utility Guide.

Setting code page for READ AND OUTPUT statements Interactive SQL determines the code page that is used for a particular OUTPUT or READ statement as follows, where code page values occurring earlier in the list take precedence over those occurring later in the list:

For more information, see “DEFAULT_ISQL_ENCODING option [DBISQL]” in Sybase IQ Reference Manual.

OUTPUT statement accepts ASIS keyword The OUTPUT statement writes output to a file. When ASIS is specified, values are written to the file without any escaping.

NoteThe OUTPUT statement and OUTPUT_FORMAT option were incorrectly omitted from some version 12.5 documentation. The OUTPUT statement is useful in making the results of a query or report available to another application, but is not recommended for bulk operations. For high volume data movement, and to produce a file you can use for loads, use the ASCII and BINARY data extraction functionality with the SELECT statement. For more information, see OUTPUT statement [DBISQL], “OUTPUT_FORMAT option [ISQL],”, “OUTPUT_LENGTH option [ISQL],” and “OUTPUT_NULLS option [ISQL]” in Sybase IQ Reference Manual.

Syntax highlighting editor in Interactive SQL You can configure the appearance of syntax typed in the SQL Statements pane of Interactive SQL using the Interactive SQL Options dialog.

Printing from Interactive SQL You can print the contents of the SQL Statements pane in Interactive SQL.

Row numbers can appear beside results in Interactive SQL Interactive SQL has an option to display row numbers beside results. This option can be set on the Results tab of the Interactive SQL options dialog.

Interactive SQL can be set as the default editor for .SQL files On Windows platforms, you can create a file association for .SQL files so that when you double-click the file, Interactive SQL is used to open the file.

Interactive SQL Command History dialog enhancements You can now copy and delete commands from the Command History dialog in Interactive SQL, as well as select multiple commands in the window. The command history now persists between Interactive SQL sessions.

Warning messages now have W prefix Prior to version 12.6, all warning and error messages had a prefix of I or E. Warning messages now have a prefix of W.

EXIT statement enhanced The Interactive SQL EXIT statement can now set an exit code for Interactive SQL. See “EXIT statement [Interactive SQL]” in Adaptive Server Anywhere SQL Reference.

Query Editor A graphical query editor has been added to Interactive SQL. With the Query Editor, you can create or edit SELECT statements without using SQL code. You can open the Query Editor in Interactive SQL by clicking Tools > Edit Query.

For more information, see SQL Anywhere Studio Help, Chapter 6, “Query Editor Help,” available in SQL Anywhere Studio 9.0.1 Core Documentation Set.

NoteAll queries that you can create using the graphical Query Editor can also be entered directly as SQL statements, using your usual method.

Editable data in Interactive SQL and Sybase Central You can update the database by editing Interactive SQL result sets, and by editing tables and views in Sybase Central. You can copy, edit, insert, and delete row values.

Data displayed in Sybase Central can be copied to the clipboard.

For more information, see “Editing table values in Interactive SQL” in Introducing SQL Anywhere Studio.

Interactive SQL supports SQL escape syntax handling Interactive SQL now supports JDBC escape syntax that allows you to access a library of functions implemented by the JDBC driver. For more information, see “Using JDBC escape syntax” in Adaptive Server Anywhere Programming Guide.

Interactive SQL batch options Additional control is given to Interactive SQL when running batch files, through the -codepage and -onerror command line options. Also, the -d1 command line option provides feedback useful for debugging batch files.

For more information, see Chapter 2, “Using Interactive SQL (dbisql)” in Sybase IQ Utility Guide.

Sybase Central and Interactive SQL accept COMMLINKS connection parameter (behavior change) In previous versions of Adaptive Server Anywhere, Sybase Central and Interactive SQL (the dbisql command line utility) ignored the COMMLINKS connection parameter. Sybase Central and Interactive SQL now accept this parameter.

As a result of this change, some connection strings may behave differently than in previous versions of Adaptive Server Anywhere. Specifically, if you do not supply COMMLINKS=tcpip, Interactive SQL and Sybase Central do not look for servers on the network.

For more information, see “CommLinks connection parameter [Links]” in Sybase IQ System Administration Guide.

Interactive SQL supports integrated logins When you connect to Interactive SQL on Windows, the Connect dialog Identification tab allows you to use an integrated login to connect to the database.

ON_ERROR = ‘CONTINUE’ option (behavior change) The ON_ERROR database option, which controls the action taken by dbisql if an error is encountered while reading statements from a command file, now displays the error when the option is set to CONTINUE. Previously, the error was ignored. Now the error is displayed and dbisql continues reading statements from the command file. For more information, see Chapter 2, “Database Options” in the Sybase IQ Reference Manual.

Options that affect data exported to ASCII files The following options were available in Version 12.5, but were previously omitted from the documentation: ISQL_ESCAPE_CHARACTER, ISQL_FIELD_SEPARATOR, and ISQL_QUOTE. For more information, see Chapter 2, “Database Options” in the Sybase IQ Reference Manual.

Option to control SQL command timing The ISQL_COMMAND_TIMING option, while available in Version 12.5, was previously omitted from the documentation. For more information, see Chapter 2, “Database Options” in the Sybase IQ Reference Manual.