PDA

View Full Version : How to CREATE a TABLE in SQL?


EvE
08-28-02, 09:29
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>

Roelwe
08-28-02, 09:51
Did you create your new table tblUNIEK?
If so, you can change your sql-string to:
insert into tblUNIEK select * from login;

rnealejr
08-28-02, 17:44
Try the following:

cn.Execute "select * into newtable from existingtable"