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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing from Oracle to SQL Server 2012 1

Status
Not open for further replies.

ImpInTraining

Programmer
Jan 27, 2007
19
0
0
US
This is probably a pretty easy question, but I can't be sure. I have very little experience with SQL. I have access to an Oracle server. I have created some identical tables in SQL Server 2012.

ORACLE = Table1 ; Table2 ; etc.
SQL Server 2012 = NEW_Table1 ; NEW_Table2 ; etc.

All of the fields of these copied tables are likewise identical but prepended with a little indicator:

ORACLE = Column1 ; Column2 ; etc.
SQL Server 2012 = NEW_Column1 ; NEW_Column2 ; etc.

What I need to do is develop a script that will import all of the data of the ORACLE tables I am interested in into SQL Server tables. I saw the SELECT INTO command and thought I was on to something, but that will create new tables and I don't really want to create new tables since I already have some in place.

Any suggestions out there?
 
As long as there are no IDENTITY columns in the NEW_ tables and the columns are of the same datatype as the Oracle tables, then tt may be as easy as ...

INSERT INTO NEW_Table1
SELECT * FROM OracleServer.OracleDatabase.dbo.Table1

You will have to substitute your values for OracleServer and OracleDatabase.

--JD
"Behold! As a wild ass in the desert go forth I to my work."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top