How do insert into table values from another table where id from one table = id from the other table?
Example:
Table 1:
ID Name CardHolderID Date
1 N 1231212 02/20/2011
2 S 1212312 02/20/2011
Table 2:
ID Name CardholderID Date
1 N null 02/20/2011
2 S null 02/20/2011
This is just an example. The database contains about 60000 records. When the data was exported, apparently the CardholderID was left out. They sent the data with CardHolderID in a different file. How can I insert the data into the Table 2 from Table 1?
I tried something like this
INSERT INTO TableA(cardholderid)
select cardholderid from tableB where tableA.id = tableB.id
I'm getting "TableA could not be bound" error.
Thanks