Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple ALTER Statements

Status
Not open for further replies.

katieb

Technical User
Feb 18, 2003
12
GB
Hi,

We have a set of 10 databases which can either run in SQL or MSAccess. We use a script to alter the SQL databases in one go,

e.g.
Use DATABASENAME
alter table tablename1 alter column columname1 varchar(55)
alter table tablename1 alter column columname2 varchar(20)
alter table tablename2 add columnname3 int
go

Our problem is updating the Access databases. How can we run these modifications in one go, at the moment we have to run each script line by line,

Any help would be much appreciated!

Thanks

Kate
 
you mean you have two separate sets of tables? One in MS SQL Server and one in MS Access? You've changed the MS SQL Server tables using the above syntax and now you need to change the Access tables?

The answer to your question is, no, you have to run each alter statement individually. MS Access can't handle multiple statements.

My question is, why aren't you using linked tables? Then you would just need to reestablish the link.

leslie
 
The tables are either in SQL or Access, not a combination of both. So thanks very much for your response - I have had no joy getting this to work and I was after confirmation that it was impossible.

Thanks for answering so quickly.

Kate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top