Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP/Access Table to Table Copy...

Posted on 2006-07-13
4
Medium Priority
?
767 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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