>Thanks Naomi. That works fine.
>
>One other similar question
>Is there any construct in SQL to emaulate the Append, but keeping existing fields intact
>e.g.
>TableA has Country,State,City,Town and is empty (no records)
>TableB has Country State and has some ecords in it
>
>Sele TableA
>Append From tableB
>..... This keeps the structure in TableA but adds on all the records from tableB and pads out fields with spaces or Zeros that exist in TableA but not in TableB
>There would not be a key linking both tables.
>
>
>Regards,
>Gerard
>
Insert into TableA (Country, State) select * from TableB
where not exists
(select 1 from TableA where TableA.State = TableB.State and TableA.City = TableB.City) -- if you only want to append new (not existing) records
If it's not broken, fix it until it is.
My Blog