p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Create table in Queries


Message #1 by "yuenkit" <janet_smith2000@y...> on Fri, 29 Jun 2001 02:22:24
the queries in Access seems similiar with the Stored Procedure in SQL 

Server.

1) i wonder, is it the queries support CREATE TABLE?

i wish to know the way to create table in Access using Queries.

2) can we create temporary table in Access, in SQL, we do it by "CREATE 

TABLE #TempTbl (abc int)"



Thankx!

Message #2 by "John Ruff" <John_Ruff@m...> on Fri, 29 Jun 2001 04:54:23 -0700
The query that will create tables is called Make-table query.



Open a new query.  From the menu, select Query>Make-table query.



Here's what it looks like in a SQL statement



DoCmd.RunSQL ("SELECT ORDER_NO, OPERATION_NO, PART_NO INTO zztbl_Temp FROM

tbl_Operations")





John Ruff - The Eternal Optimist :)





-----Original Message-----

From:	yuenkit [mailto:janet_smith2000@y...]

Sent:	Friday, June 29, 2001 2:22 AM

To:	Access

Subject:	[access] Create table in Queries



the queries in Access seems similiar with the Stored Procedure in SQL

Server.

1) i wonder, is it the queries support CREATE TABLE?

i wish to know the way to create table in Access using Queries.

2) can we create temporary table in Access, in SQL, we do it by "CREATE

TABLE #TempTbl (abc int)"



Thankx!



Message #3 by "Pardee, Roy E" <roy.e.pardee@l...> on Fri, 29 Jun 2001 07:21:41 -0700
Jet SQL does support CREATE TABLE, which you can use either by typing

directly into the SQL view of a query object, or by issuing the commands via

ADO (in which case you get some extra capabilities for setting default

values, cascading referential integrity, etc.).  There's a good chapter on

Jet SQL in vol I of Litwin Getz & Gilbert's Access 2000 Developer's

Handbook, if you care to chase that down.



As I understand it you can create special temporary tables in SQL server

that are automatically dropped when the connection that created them is

closed--I don't believe there's any analogue in Access, but you can

certainly do an explicit DROP TABLE when you're done using a temporary

table.



Hope that helps.



-Roy



-----Original Message-----

From: yuenkit [mailto:janet_smith2000@y...]

Sent: Thursday, June 28, 2001 7:21 PM

To: Access

Subject: [access] Create table in Queries





the queries in Access seems similiar with the Stored Procedure in SQL 

Server.

1) i wonder, is it the queries support CREATE TABLE?

i wish to know the way to create table in Access using Queries.

2) can we create temporary table in Access, in SQL, we do it by "CREATE 

TABLE #TempTbl (abc int)"



Thankx!






  Return to Index