Afficher un message
Vieux 28/03/2008, 17h47   #1
alvinstraight38@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How Do You Copy Data From One Table to Another?

I can't believe this function is not simple. All I need to do is copy
the entire contents of one database table into another existing
table. The two tables exist on separate databases. I am trying to
load the patient list from Database A patients_visits table to
Database B patients_visits table.

I tried some SQL commands, and the best I could do was to create a
brand new table in my database with the copied contents. The new table
is called patients_two. So I tried this commmand:

insert into patients_visits select * from patients_two

Freaking SQL complains:

"An explicit value for the identity column in table 'patients_visits'
can only be specified when a column list is used and IDENTITY_INSERT
is ON."

Can anyone tell me what I am doing wrong, or is there an easier
method?

Thanks!
  Réponse avec citation
 
Page generated in 0,06945 seconds with 9 queries