Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP/Access Table to Table Copy...

Posted on 2006-07-13
4
Medium Priority
?
772 Views
Last Modified: 2012-06-21
When a new "site" is created in our database, I'd like it to create a new status database from the template.  

I have a table that is a template for other tables to be created.  It is blank but is completely set up as far as field sizes, column names, primary keys, data types, etc.  Is there a way to effectively "clone" this table under a different name?

For example, if the new site is 6721, I'd like it to make a table called "istatus6721" using the format of "tpl_istatus".

Database is MSACCESS (Not my choice, I swear) and web interface is ASP.

Thoughts?

Joe
0
Comment
Question by:Joe Jenkins
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Devil666 earned 1000 total points
ID: 17099030
hi there,

the following SQL should help you

SELECT tpl_istatus.* into istatus6721
FROM tpl_istatus;

hth
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 17125388
You could just use DDL to create the new table.
There are tools such as AQT that will create the DDL for existing tables.
0
 
LVL 5

Author Comment

by:Joe Jenkins
ID: 17129228
The SQL code above worked nicely with ASP.

I considered AQT for this as it would be a fantastic tool getting exact copies of tables BUT requiring each of our sites to purchase a license just to copy tables would be a waste of company resources.  The tables that are being copied are just simple collections of data and not too high on the importance meter but are necessary for the program to run correctly.  

Thanks again for the input.

Joe
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 17134358
Oh, sorry.
I thought you wanted to "make the table" not copy the data into one that's already created.

BTW, I use AQT a lot because I'm working with so many different databases... db2, sql server, sybase and access.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question