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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Queries in one Statement

Status
Not open for further replies.

MetallicCloud

Programmer
May 17, 2007
1
AU
Hello,
I have a simple question...

Is it possible to either put the following statements into a single query, or create another query that will run all three of these...

CREATE TABLE ClosedStudio(
StudioID number PRIMARY KEY, Name text(30), Country text(20));

INSERT INTO ClosedStudio
SELECT s.StudioID AS StudioID, s.Name AS Name, s.Country AS Country FROM Studio AS s WHERE ClsYear Is Not Null;

DELETE s FROM Studio AS s
WHERE s.ClsYear Is Not Null;

Cheers
 
This is not possible in Access. You could write a little DAO code that would run each of the queries one at a time.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top