Computer Hope

Microsoft => Microsoft DOS => Topic started by: 19499787 on April 08, 2007, 05:54:53 AM

Title: script with SQL/DOS
Post by: 19499787 on April 08, 2007, 05:54:53 AM
I've an SQL script I was to run against many SQL tables, its a basic .txt file ready for input into a compiler.

My Tables are (example)

A001
A002
A003
A004

the script is

Open table "&.tab"\nalter table & (add areasqm decimal (10,2))\nupdate & set
areasqm = area (obj, "sq m")\ncommit table &\nclose table &


where & is the table name, seem to remember I need something like a ^ before each table name, but I've forgotton.

Can one of you clever folk point me in the right direction.

TIA

Dave


Title: Re: script with SQL/DOS
Post by: Sidewinder on April 08, 2007, 06:21:28 AM
Couldn't be sure what database you're using but generally table names are used as literals without quotes, same with table fields, except they may be qualified by the table name.

You are a braver soul than I, altering the table directly without a temporary table (recordset). Good luck. 8)