Skip to contents

Execute a SQL command to the database

Usage

sql_execute(sql, db_name = "Elmer")

Arguments

sql

String. The SQL command to send to <db_name>.

db_name

String. The name of the database to run the query against. Should be "Elmer" or "ElmerGeo". Default = "Elmer".

Value

nothing

Details

Intended for update, merge or other commands that do not retrieve records. For retrieval, use get_query.

Examples

sql_qry = "UPDATE dbo.testtable SET field_a = 2 WHERE 1 != 1"
sql_execute(sql=sql_qry, db_name='Elmer')