Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transfering records between tables

Status
Not open for further replies.
Mar 20, 2003
103
AU
I need a script to tranfer record from TABLE A to TABLE B on an SQL command when an ASP page is uploaded.

eg Select * from TABLE A where REGISTERED ="T"

Both tables are of the same structure.

Does anyone know how to do it?

 
insert into mynewtable select * from TABLE A where REGISTERED = "T"

It's an easy query. But you do have to know that the new table is either empty to start with or that the incoming data is not going to conflict with existing data in fields that disallow duplicate records.



Stamp out, eliminate and abolish redundancy!
 
one small correction:

Code:
insert into TableB 
select * from TABLE A where REGISTERED = [red]'T'[/red]

watch out for duplicate ids...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top