Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: script with SQL/DOS  (Read 7955 times)

0 Members and 1 Guest are viewing this topic.

19499787

  • Guest
script with SQL/DOS
« 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



Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: script with SQL/DOS
« Reply #1 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)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein