Create a new table using a file with SQL statements:
db.execute driver=odbc database=g51test
input=file.sql
Update attribute entries to new value based on SQL rule:
echo "UPDATE roads SET travelcost=5 WHERE cat=1" | db.execute
Update attribute entries to new value based on SQL rule:
echo "UPDATE dourokukan SET testc=50 WHERE testc is NULL" | db.execute
Add new column to attribute table:
echo "ALTER TABLE roads ADD COLUMN length double" | db.execute
Drop table (not supported by all drivers)
echo "DROP TABLE fmacopy" | db.execute
Update attribute with multiple SQL instructions in file (e.g., file.sql,
instruction line must end with semicolon):
UPDATE roads SET travelcost=5 WHERE cat=1;
UPDATE roads SET travelcost=2 WHERE cat=2;
cat file.sql | db.execute
Last changed: $Date: 2005/05/06 13:31:29 $