If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How to CREATE a TABLE in SQL?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-28-02, 08:29
EvE EvE is offline
Registered User
 
Join Date: Aug 2002
Location: Holland
Posts: 16
Question How to CREATE a TABLE in SQL?

I am trying to copy a table, but without success. I use MS Access 2000 and ASP. Does anyone know how to do this?

The code is as follows:

<HTML><BODY><TABLE>

<%

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("../db/db2.mdb")
sqlString = "SELECT * FROM login SAVE TO tblUNIEK"
Conn.Execute sqlString
Conn.Close

%>
</TABLE>


</BODY></HTML>
Reply With Quote
  #2 (permalink)  
Old 08-28-02, 08:51
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Did you create your new table tblUNIEK?
If so, you can change your sql-string to:
insert into tblUNIEK select * from login;
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 08-28-02, 16:44
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Try the following:

cn.Execute "select * into newtable from existingtable"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On