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

stupid import question

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
I know for you experts this is a stupid question but I'm a VB6 programmer and need help.

I have a new SQL db with most of the tables having the same name etc as the one I want to import the data from but not all. I only want to import data from some of the tables not all. Then one of the columns in a table I need to change all records from let's say 57 to be 26. Any help would be really really helpful.
 
What do you want to happen to the duplicate table names? Do you intend to change the name of the imported tables?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Thanks for responding donutman

I want to import the data from several tables that have the exact same table name in the new database. So I need to choose the table to import the data into the new table with the same name not all the tables all at once. I hope this is clear and not clear as mud :) Then one of the tables I need to change one of the columns data from let's say 56 to 28. IE one column has all 56 and I need to change it to 28.

BTW the database has the same name so I guess I need to change the name for the one I'm importing from.
 
Go into the Enterprise Manager (EM) and open up the databases to the one that you want to import into. Right click any table and choose All Tasks, Import. Follow the import wizard. There are options along the way for creating a new table if you want. You can replace existing data of an existing table if you want.
After the import you can write an Update query that will change a particular column from 56 to 28. This could actually be done during the import, but it's more complicated that way.
I hope this gets you started. If you need further help...just ask.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top