SAGA-GIS Tool Library Documentation (v6.3.0)

Tool Execute SQL

Execute SQL commands on a connected ODBC source. Separate different commands with a semicolon (';').

Parameters

 NameTypeIdentifierDescriptionConstraints
OptionsDSNTextODBC_DSNData Source Name-
UserTextODBC_USRUser Name-
PasswordTextODBC_PWDPassword-
Server ConnectionChoiceCONNECTIONServer ConnectionAvailable Choices:
[0]
Default: 0
SQL StatmentLong textSQL-Default: CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER);
INSERT INTO myTable1 (Col1, Col2) VALUES('First Value', 1);
DROP TABLE myTable1;
CommitBooleanCOMMIT-Default: 1
Stop on ErrorBooleanSTOP-Default: 0

Command-line

Usage: saga_cmd db_odbc 3 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] [-SQL <str>] [-COMMIT <str>] [-STOP <str>]
  -ODBC_DSN:<str>	DSN
	Text
  -ODBC_USR:<str>	User
	Text
  -ODBC_PWD:<str>	Password
	Text
  -SQL:<str>     	SQL Statment
	Long text
	Default: CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER);
INSERT INTO myTable1 (Col1, Col2) VALUES('First Value', 1);
DROP TABLE myTable1;

  -COMMIT:<str>  	Commit
	Boolean
	Default: 1
  -STOP:<str>    	Stop on Error
	Boolean
	Default: 0