Calgarypuck Forums - The Unofficial Calgary Flames Fan Community

Go Back   Calgarypuck Forums - The Unofficial Calgary Flames Fan Community > Main Forums > The Off Topic Forum
Register Forum Rules FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 05-27-2005, 09:07 AM   #1
TheyCallMeBruce
Likes Cartoons
 
TheyCallMeBruce's Avatar
 
Join Date: Apr 2004
Exp:
Default

I'm having a bad mental block today. I'm trying to import a file containing a single table into an existing schema, but I know I have to drop the table in the schema first. What do I need to do?

I know to import into the existing schema, the table has to be dropped. I can do this "imp file=file.dmp log=log.log fromuser=schema1 touser=schema2 table=table" but something has to come before that (dropping the table).
TheyCallMeBruce is offline   Reply With Quote
Old 05-27-2005, 09:37 AM   #2
ah123
First Line Centre
 
Join Date: Oct 2001
Location: Here
Exp:
Default

You need to drop or truncate the table if I recall correctly -

Dropping table = "drop table xxx"
Truncate table = "truncate table xxx"

(remove quotes, xxx=name of table)

Hope that is what you were looking for...
ah123 is online now   Reply With Quote
Old 05-27-2005, 10:04 AM   #3
TheyCallMeBruce
Likes Cartoons
 
TheyCallMeBruce's Avatar
 
Join Date: Apr 2004
Exp:
Default

Quote:
Originally posted by ah123@May 27 2005, 03:37 PM
You need to drop or truncate the table if I recall correctly -

Dropping table = "drop table xxx"
Truncate table = "truncate table xxx"

(remove quotes, xxx=name of table)

Hope that is what you were looking for...
Thanks, but I manage to figure it out anyway. I just had to drop all the keys, drop the table, import the table, and rebuild my keys. things are fine now.
TheyCallMeBruce is offline   Reply With Quote
Old 05-27-2005, 03:45 PM   #4
Shawnski
CP's Resident DJ
 
Shawnski's Avatar
 
Join Date: Jul 2003
Location: In the Gin Bin
Exp:
Default

An alternative in the future for you, should you not what to drop and recreate the indexes, is to import your file into a temporary or staging table, truncate your production table then append to it from the temporary one.

Adds the benefit of being able to view the data before you append it into production, and can be faster.
Shawnski is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:06 PM.

Calgary Flames
2024-25




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021 | See Our Privacy Policy