Commands  System procedures

Chapter 1: Quick Reference

Interactive dbsql commands

This section provides the syntax and brief descriptions for interactive dbsql commands for Adaptive Server. See Reference Manual: Commands for more information.

clear

Clears the Interactive SQL panes.

clear

configure

Opens the Interactive SQL Options dialog.

configure

connect

Establishes a connection to a database.

connect
	[ to engine_name ]
	[ database database_name ]
	[ as connection_name ]
	[ user ] user_id identified by password
	engine_name, database_name, connection_name, user_id ,
		password :
			{ identifier | string | hostvar }
connect using connect_string : { identifier | string | hostvar }

disconnect

Drops the current connection to a database.

disconnect [ connection_name | current | all ]
	connection_name : identifier , string, or hostvar

exit

Leaves Interactive SQL.

{ exit | quit | bye } [ return_code ]
	return_code: number | connection_variable

input

Imports data into a database table from an external file or from the keyboard.

input into [ owner.]table-name
	[ from filename | prompt]
	[ format input-format ]
	[ escape character character ]
	[ escapes { on | off }
	[ by order | by name ]
	[ delimited by string ]
	[ column widths (integer , . . . ) ]
	[ nostrip ]
	[ ( column-name, . . . ) ]
	[ encoding encoding ]
	input-format :
	ascii | dbase | dbasell| dbaselll
	| excel | fixed | foxpro | lotus

encoding : identifier or string

output

Imports data into a database table from an external file or from the keyboard.

output to filename
	[ append ]
	[ verbose ]
	[ format output-format ]
	[ escape character character ]
	[ escapes { on | off}
	[ delimited by string ]
	[ quote string [ all ] ]
	[ column widths (integer , . . . ) ]
	[ hexidecimal { on | off | asis } ]
	[ encoding encoding ]

output-format :
	ascii | dbase | dbasell| dbaselll 
		| excel | fixed | foxpro | lotus | sql | xml

encoding : string or identifier

parameters

Specifies parameters to an Interactive SQL command file.

parameters parameter1, parameter2, . . .

read

Reads Interactive SQL statements from a file.

read [ encoding encoding ] file_name [ parameters ]
encoding : identifier or string

set connection

Changes the current database connection to another server.

set connection_name :
	identifier , string, or hostvar

set option

Changes the values of Interactive SQL options.

set [ temporary] option
	[ user_id. | public. ]option_name = [ option_value ]
	user_id : identifier , string or hostvar
	option_name : identifier , string or hostvar
set permanent
set

start logging

Starts logging executed SQL statements to a log file.

start logging file_name

stop logging

Stops logging of executed SQL statements in the current session.

stop logging

system

Launches an executable file from within Interactive SQL.

system ‘[path] file_name




Copyright © 2005. Sybase Inc. All rights reserved. System procedures

View this book as PDF