Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Inserting Records into Table

Author  Topic 

Jonny1409
Posting Yak Master

133 Posts

Posted - 2007-10-04 : 04:41:47
Hello,

I have a table in my old Access DB which contains employee's personal records (Ref, Forename, Surname, DOB etc)

I have records in here that I would like added to my new table in SQL.

However, some of the field names are different in SQL e.g. EENo, FirstName, Surname, DateOfBirth etc

How can I do this please ?
I believe I would need an INSERT Statement, but I'm not sure of the correct syntax.

Thanks in advance

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-04 : 04:45:01
Are you going to import Access table in SQL Server?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Jonny1409
Posting Yak Master

133 Posts

Posted - 2007-10-04 : 04:46:43
If it would make it easier I could.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-04 : 04:48:37
If you use SSIS (SQL 2005) or DTS (SQL 2000), you don't have to worry about column names being different. You just have to map columns from source to destination properly.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-04 : 05:22:17
Also you can do this using query. Read about OPENROWSET in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -